<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE FlexibleContexts #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE RankNTypes #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- Module      :  Distribution.Simple.PreProcess</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Copyright   :  (c) 2003-2005, Isaac Jones, Malcolm Wallace</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- License     :  BSD3</span><span>
</span><span id="line-9"></span><span class="hs-comment">--</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Maintainer  :  cabal-devel@haskell.org</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-12"></span><span class="hs-comment">--</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- This defines a 'PreProcessor' abstraction which represents a pre-processor</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- that can transform one kind of file into another. There is also a</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- 'PPSuffixHandler' which is a combination of a file extension and a function</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- for configuring a 'PreProcessor'. It defines a bunch of known built-in</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- preprocessors like @cpp@, @cpphs@, @c2hs@, @hsc2hs@, @happy@, @alex@ etc and</span><span>
</span><span id="line-18"></span><span class="hs-comment">-- lists them in 'knownSuffixHandlers'. On top of this it provides a function</span><span>
</span><span id="line-19"></span><span class="hs-comment">-- for actually preprocessing some sources given a bunch of known suffix</span><span>
</span><span id="line-20"></span><span class="hs-comment">-- handlers. This module is not as good as it could be, it could really do with</span><span>
</span><span id="line-21"></span><span class="hs-comment">-- a rewrite to address some of the problems we have with pre-processors.</span><span>
</span><span id="line-22"></span><span>
</span><span id="line-23"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Distribution.Simple.PreProcess</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.PreProcess.html#preprocessComponent"><span class="hs-identifier">preprocessComponent</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#preprocessExtras"><span class="hs-identifier">preprocessExtras</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>                                </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#knownSuffixHandlers"><span class="hs-identifier">knownSuffixHandlers</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#ppSuffixes"><span class="hs-identifier">ppSuffixes</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>                                </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#PPSuffixHandler"><span class="hs-identifier">PPSuffixHandler</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#PreProcessor"><span class="hs-identifier">PreProcessor</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-26"></span><span>                                </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#mkSimplePreProcessor"><span class="hs-identifier">mkSimplePreProcessor</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#runSimplePreProcessor"><span class="hs-identifier">runSimplePreProcessor</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-27"></span><span>                                </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#ppCpp"><span class="hs-identifier">ppCpp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#ppCpp%27"><span class="hs-identifier">ppCpp'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#ppGreenCard"><span class="hs-identifier">ppGreenCard</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#ppC2hs"><span class="hs-identifier">ppC2hs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#ppHsc2hs"><span class="hs-identifier">ppHsc2hs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>                                </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#ppHappy"><span class="hs-identifier">ppHappy</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#ppAlex"><span class="hs-identifier">ppAlex</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#ppUnlit"><span class="hs-identifier">ppUnlit</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#platformDefines"><span class="hs-identifier">platformDefines</span></a></span><span>
</span><span id="line-29"></span><span>                               </span><span class="hs-special">)</span><span>
</span><span id="line-30"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-31"></span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Prelude.html"><span class="hs-identifier">Distribution.Compat.Prelude</span></a></span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Stack.html"><span class="hs-identifier">Distribution.Compat.Stack</span></a></span><span>
</span><span id="line-35"></span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.Unlit.html"><span class="hs-identifier">Distribution.Simple.PreProcess.Unlit</span></a></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Backpack.DescribeUnitId.html"><span class="hs-identifier">Distribution.Backpack.DescribeUnitId</span></a></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Package.html"><span class="hs-identifier">Distribution.Package</span></a></span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.ModuleName.html"><span class="hs-identifier">Distribution.ModuleName</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">ModuleName</span></span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.ModuleName.html"><span class="hs-identifier">Distribution.ModuleName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier">ModuleName</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-41"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.PackageDescription.html"><span class="hs-identifier">Distribution.PackageDescription</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">PD</span></span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.InstalledPackageInfo.html"><span class="hs-identifier">Distribution.InstalledPackageInfo</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Installed</span></span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Simple.PackageIndex.html"><span class="hs-identifier">Distribution.Simple.PackageIndex</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">PackageIndex</span></span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.CCompiler.html"><span class="hs-identifier">Distribution.Simple.CCompiler</span></a></span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html"><span class="hs-identifier">Distribution.Simple.Compiler</span></a></span><span>
</span><span id="line-46"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.LocalBuildInfo.html"><span class="hs-identifier">Distribution.Simple.LocalBuildInfo</span></a></span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildPaths.html"><span class="hs-identifier">Distribution.Simple.BuildPaths</span></a></span><span>
</span><span id="line-48"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Utils.html"><span class="hs-identifier">Distribution.Simple.Utils</span></a></span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.html"><span class="hs-identifier">Distribution.Simple.Program</span></a></span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.ResponseFile.html"><span class="hs-identifier">Distribution.Simple.Program.ResponseFile</span></a></span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Test.LibV09.html"><span class="hs-identifier">Distribution.Simple.Test.LibV09</span></a></span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.System.html"><span class="hs-identifier">Distribution.System</span></a></span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Pretty.html"><span class="hs-identifier">Distribution.Pretty</span></a></span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Version.html"><span class="hs-identifier">Distribution.Version</span></a></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html"><span class="hs-identifier">Distribution.Verbosity</span></a></span><span>
</span><span id="line-56"></span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#"><span class="hs-identifier">System.Directory</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../directory/src/System.Directory.html#doesFileExist"><span class="hs-identifier">doesFileExist</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/System.Info.html#"><span class="hs-identifier">System.Info</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/System.Info.html#os"><span class="hs-identifier">os</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/System.Info.html#arch"><span class="hs-identifier">arch</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.html#"><span class="hs-identifier">System.FilePath</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#splitExtension"><span class="hs-identifier">splitExtension</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#dropExtensions"><span class="hs-identifier">dropExtensions</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator">(&lt;/&gt;)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator">(&lt;.&gt;)</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-60"></span><span>                        </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#takeDirectory"><span class="hs-identifier">takeDirectory</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#normalise"><span class="hs-identifier">normalise</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#replaceExtension"><span class="hs-identifier">replaceExtension</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-61"></span><span>                        </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#takeExtensions"><span class="hs-identifier">takeExtensions</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-62"></span><span>
</span><span id="line-63"></span><span class="hs-comment">-- |The interface to a preprocessor, which may be implemented using an</span><span>
</span><span id="line-64"></span><span class="hs-comment">-- external program, but need not be.  The arguments are the name of</span><span>
</span><span id="line-65"></span><span class="hs-comment">-- the input file, the name of the output file and a verbosity level.</span><span>
</span><span id="line-66"></span><span class="hs-comment">-- Here is a simple example that merely prepends a comment to the given</span><span>
</span><span id="line-67"></span><span class="hs-comment">-- source file:</span><span>
</span><span id="line-68"></span><span class="hs-comment">--</span><span>
</span><span id="line-69"></span><span class="hs-comment">-- &gt; ppTestHandler :: PreProcessor</span><span>
</span><span id="line-70"></span><span class="hs-comment">-- &gt; ppTestHandler =</span><span>
</span><span id="line-71"></span><span class="hs-comment">-- &gt;   PreProcessor {</span><span>
</span><span id="line-72"></span><span class="hs-comment">-- &gt;     platformIndependent = True,</span><span>
</span><span id="line-73"></span><span class="hs-comment">-- &gt;     runPreProcessor = mkSimplePreProcessor $ \inFile outFile verbosity -&gt;</span><span>
</span><span id="line-74"></span><span class="hs-comment">-- &gt;       do info verbosity (inFile++&quot; has been preprocessed to &quot;++outFile)</span><span>
</span><span id="line-75"></span><span class="hs-comment">-- &gt;          stuff &lt;- readFile inFile</span><span>
</span><span id="line-76"></span><span class="hs-comment">-- &gt;          writeFile outFile (&quot;-- preprocessed as a test\n\n&quot; ++ stuff)</span><span>
</span><span id="line-77"></span><span class="hs-comment">-- &gt;          return ExitSuccess</span><span>
</span><span id="line-78"></span><span class="hs-comment">--</span><span>
</span><span id="line-79"></span><span class="hs-comment">-- We split the input and output file names into a base directory and the</span><span>
</span><span id="line-80"></span><span class="hs-comment">-- rest of the file name. The input base dir is the path in the list of search</span><span>
</span><span id="line-81"></span><span class="hs-comment">-- dirs that this file was found in. The output base dir is the build dir where</span><span>
</span><span id="line-82"></span><span class="hs-comment">-- all the generated source files are put.</span><span>
</span><span id="line-83"></span><span class="hs-comment">--</span><span>
</span><span id="line-84"></span><span class="hs-comment">-- The reason for splitting it up this way is that some pre-processors don't</span><span>
</span><span id="line-85"></span><span class="hs-comment">-- simply generate one output .hs file from one input file but have</span><span>
</span><span id="line-86"></span><span class="hs-comment">-- dependencies on other generated files (notably c2hs, where building one</span><span>
</span><span id="line-87"></span><span class="hs-comment">-- .hs file may require reading other .chi files, and then compiling the .hs</span><span>
</span><span id="line-88"></span><span class="hs-comment">-- file may require reading a generated .h file). In these cases the generated</span><span>
</span><span id="line-89"></span><span class="hs-comment">-- files need to embed relative path names to each other (eg the generated .hs</span><span>
</span><span id="line-90"></span><span class="hs-comment">-- file mentions the .h file in the FFI imports). This path must be relative to</span><span>
</span><span id="line-91"></span><span class="hs-comment">-- the base directory where the generated files are located, it cannot be</span><span>
</span><span id="line-92"></span><span class="hs-comment">-- relative to the top level of the build tree because the compilers do not</span><span>
</span><span id="line-93"></span><span class="hs-comment">-- look for .h files relative to there, ie we do not use \&quot;-I .\&quot;, instead we</span><span>
</span><span id="line-94"></span><span class="hs-comment">-- use \&quot;-I dist\/build\&quot; (or whatever dist dir has been set by the user)</span><span>
</span><span id="line-95"></span><span class="hs-comment">--</span><span>
</span><span id="line-96"></span><span class="hs-comment">-- Most pre-processors do not care of course, so mkSimplePreProcessor and</span><span>
</span><span id="line-97"></span><span class="hs-comment">-- runSimplePreProcessor functions handle the simple case.</span><span>
</span><span id="line-98"></span><span class="hs-comment">--</span><span>
</span><span id="line-99"></span><span class="hs-keyword">data</span><span> </span><span id="PreProcessor"><span class="annot"><a href="Distribution.Simple.PreProcess.html#PreProcessor"><span class="hs-identifier hs-var">PreProcessor</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="PreProcessor"><span class="annot"><a href="Distribution.Simple.PreProcess.html#PreProcessor"><span class="hs-identifier hs-var">PreProcessor</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-100"></span><span>
</span><span id="line-101"></span><span>  </span><span class="hs-comment">-- Is the output of the pre-processor platform independent? eg happy output</span><span>
</span><span id="line-102"></span><span>  </span><span class="hs-comment">-- is portable haskell but c2hs's output is platform dependent.</span><span>
</span><span id="line-103"></span><span>  </span><span class="hs-comment">-- This matters since only platform independent generated code can be</span><span>
</span><span id="line-104"></span><span>  </span><span class="hs-comment">-- included into a source tarball.</span><span>
</span><span id="line-105"></span><span>  </span><span id="platformIndependent"><span class="annot"><span class="annottext">PreProcessor -&gt; Bool
</span><a href="Distribution.Simple.PreProcess.html#platformIndependent"><span class="hs-identifier hs-var hs-var">platformIndependent</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">,</span><span>
</span><span id="line-106"></span><span>
</span><span id="line-107"></span><span>  </span><span class="hs-comment">-- TODO: deal with pre-processors that have implementation dependent output</span><span>
</span><span id="line-108"></span><span>  </span><span class="hs-comment">--       eg alex and happy have --ghc flags. However we can't really include</span><span>
</span><span id="line-109"></span><span>  </span><span class="hs-comment">--       ghc-specific code into supposedly portable source tarballs.</span><span>
</span><span id="line-110"></span><span>
</span><span id="line-111"></span><span>  </span><span id="runPreProcessor"><span class="annot"><span class="annottext">PreProcessor
-&gt; (String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ()
</span><a href="Distribution.Simple.PreProcess.html#runPreProcessor"><span class="hs-identifier hs-var hs-var">runPreProcessor</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- Location of the source file relative to a base dir</span><span>
</span><span id="line-112"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- Output file name, relative to an output base dir</span><span>
</span><span id="line-113"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-comment">-- verbosity</span><span>
</span><span id="line-114"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>     </span><span class="hs-comment">-- Should exit if the preprocessor fails</span><span>
</span><span id="line-115"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-116"></span><span>
</span><span id="line-117"></span><span class="hs-comment">-- | Function to determine paths to possible extra C sources for a</span><span>
</span><span id="line-118"></span><span class="hs-comment">-- preprocessor: just takes the path to the build directory and uses</span><span>
</span><span id="line-119"></span><span class="hs-comment">-- this to search for C sources with names that match the</span><span>
</span><span id="line-120"></span><span class="hs-comment">-- preprocessor's output name format.</span><span>
</span><span id="line-121"></span><span class="hs-keyword">type</span><span> </span><span id="PreProcessorExtras"><span class="annot"><a href="Distribution.Simple.PreProcess.html#PreProcessorExtras"><span class="hs-identifier hs-var">PreProcessorExtras</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-122"></span><span>
</span><span id="line-123"></span><span>
</span><span id="line-124"></span><span class="annot"><a href="Distribution.Simple.PreProcess.html#mkSimplePreProcessor"><span class="hs-identifier hs-type">mkSimplePreProcessor</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-125"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-126"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-127"></span><span id="mkSimplePreProcessor"><span class="annot"><span class="annottext">mkSimplePreProcessor :: (String -&gt; String -&gt; Verbosity -&gt; IO ())
-&gt; (String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ()
</span><a href="Distribution.Simple.PreProcess.html#mkSimplePreProcessor"><span class="hs-identifier hs-var hs-var">mkSimplePreProcessor</span></a></span></span><span> </span><span id="local-6989586621679725946"><span class="annot"><span class="annottext">String -&gt; String -&gt; Verbosity -&gt; IO ()
</span><a href="#local-6989586621679725946"><span class="hs-identifier hs-var">simplePP</span></a></span></span><span>
</span><span id="line-128"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621679725945"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725945"><span class="hs-identifier hs-var">inBaseDir</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679725944"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725944"><span class="hs-identifier hs-var">inRelativeFile</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-129"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621679725943"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725943"><span class="hs-identifier hs-var">outBaseDir</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679725942"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725942"><span class="hs-identifier hs-var">outRelativeFile</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679725941"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725941"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Verbosity -&gt; IO ()
</span><a href="#local-6989586621679725946"><span class="hs-identifier hs-var">simplePP</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725940"><span class="hs-identifier hs-var">inFile</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725939"><span class="hs-identifier hs-var">outFile</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725941"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-130"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679725940"><span class="annot"><span class="annottext">inFile :: String
</span><a href="#local-6989586621679725940"><span class="hs-identifier hs-var hs-var">inFile</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#normalise"><span class="hs-identifier hs-var">normalise</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725945"><span class="hs-identifier hs-var">inBaseDir</span></a></span><span>  </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725944"><span class="hs-identifier hs-var">inRelativeFile</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-131"></span><span>        </span><span id="local-6989586621679725939"><span class="annot"><span class="annottext">outFile :: String
</span><a href="#local-6989586621679725939"><span class="hs-identifier hs-var hs-var">outFile</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#normalise"><span class="hs-identifier hs-var">normalise</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725943"><span class="hs-identifier hs-var">outBaseDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725942"><span class="hs-identifier hs-var">outRelativeFile</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-132"></span><span>
</span><span id="line-133"></span><span class="annot"><a href="Distribution.Simple.PreProcess.html#runSimplePreProcessor"><span class="hs-identifier hs-type">runSimplePreProcessor</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#PreProcessor"><span class="hs-identifier hs-type">PreProcessor</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-134"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-135"></span><span id="runSimplePreProcessor"><span class="annot"><span class="annottext">runSimplePreProcessor :: PreProcessor -&gt; String -&gt; String -&gt; Verbosity -&gt; IO ()
</span><a href="Distribution.Simple.PreProcess.html#runSimplePreProcessor"><span class="hs-identifier hs-var hs-var">runSimplePreProcessor</span></a></span></span><span> </span><span id="local-6989586621679725938"><span class="annot"><span class="annottext">PreProcessor
</span><a href="#local-6989586621679725938"><span class="hs-identifier hs-var">pp</span></a></span></span><span> </span><span id="local-6989586621679725937"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725937"><span class="hs-identifier hs-var">inFile</span></a></span></span><span> </span><span id="local-6989586621679725936"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725936"><span class="hs-identifier hs-var">outFile</span></a></span></span><span> </span><span id="local-6989586621679725935"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725935"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-136"></span><span>  </span><span class="annot"><span class="annottext">PreProcessor
-&gt; (String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ()
</span><a href="Distribution.Simple.PreProcess.html#runPreProcessor"><span class="hs-identifier hs-var hs-var">runPreProcessor</span></a></span><span> </span><span class="annot"><span class="annottext">PreProcessor
</span><a href="#local-6989586621679725938"><span class="hs-identifier hs-var">pp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725937"><span class="hs-identifier hs-var">inFile</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725936"><span class="hs-identifier hs-var">outFile</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725935"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span class="hs-comment">-- |A preprocessor for turning non-Haskell files with the given extension</span><span>
</span><span id="line-139"></span><span class="hs-comment">-- into plain Haskell source files.</span><span>
</span><span id="line-140"></span><span class="hs-keyword">type</span><span> </span><span id="PPSuffixHandler"><span class="annot"><a href="Distribution.Simple.PreProcess.html#PPSuffixHandler"><span class="hs-identifier hs-var">PPSuffixHandler</span></a></span></span><span>
</span><span id="line-141"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Types.BuildInfo.html#BuildInfo"><span class="hs-identifier hs-type">BuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#PreProcessor"><span class="hs-identifier hs-type">PreProcessor</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-142"></span><span>
</span><span id="line-143"></span><span class="hs-comment">-- | Apply preprocessors to the sources from 'hsSourceDirs' for a given</span><span>
</span><span id="line-144"></span><span class="hs-comment">-- component (lib, exe, or test suite).</span><span>
</span><span id="line-145"></span><span class="annot"><a href="Distribution.Simple.PreProcess.html#preprocessComponent"><span class="hs-identifier hs-type">preprocessComponent</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span>
</span><span id="line-146"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Component.html#Component"><span class="hs-identifier hs-type">Component</span></a></span><span>
</span><span id="line-147"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span>
</span><span id="line-148"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span>
</span><span id="line-149"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-150"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-151"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.PreProcess.html#PPSuffixHandler"><span class="hs-identifier hs-type">PPSuffixHandler</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-152"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-153"></span><span id="preprocessComponent"><span class="annot"><span class="annottext">preprocessComponent :: PackageDescription
-&gt; Component
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; Bool
-&gt; Verbosity
-&gt; [PPSuffixHandler]
-&gt; IO ()
</span><a href="Distribution.Simple.PreProcess.html#preprocessComponent"><span class="hs-identifier hs-var hs-var">preprocessComponent</span></a></span></span><span> </span><span id="local-6989586621679725934"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725934"><span class="hs-identifier hs-var">pd</span></a></span></span><span> </span><span id="local-6989586621679725933"><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679725933"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span id="local-6989586621679725932"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725932"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679725931"><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725931"><span class="hs-identifier hs-var">clbi</span></a></span></span><span> </span><span id="local-6989586621679725930"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725930"><span class="hs-identifier hs-var">isSrcDist</span></a></span></span><span> </span><span id="local-6989586621679725929"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725929"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679725928"><span class="annot"><span class="annottext">[PPSuffixHandler]
</span><a href="#local-6989586621679725928"><span class="hs-identifier hs-var">handlers</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-154"></span><span> </span><span class="hs-comment">-- NB: never report instantiation here; we'll report it properly when</span><span>
</span><span id="line-155"></span><span> </span><span class="hs-comment">-- building.</span><span>
</span><span id="line-156"></span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; String
-&gt; PackageIdentifier
-&gt; ComponentName
-&gt; Maybe [(ModuleName, Module)]
-&gt; IO ()
forall a.
Pretty a =&gt;
Verbosity
-&gt; String
-&gt; PackageIdentifier
-&gt; ComponentName
-&gt; Maybe [(ModuleName, a)]
-&gt; IO ()
</span><a href="Distribution.Backpack.DescribeUnitId.html#setupMessage%27"><span class="hs-identifier hs-var">setupMessage'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725929"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Preprocessing&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDescription -&gt; PackageIdentifier
forall pkg. Package pkg =&gt; pkg -&gt; PackageIdentifier
</span><a href="Distribution.Package.html#packageId"><span class="hs-identifier hs-var">packageId</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725934"><span class="hs-identifier hs-var">pd</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-157"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentLocalBuildInfo -&gt; ComponentName
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentLocalName"><span class="hs-identifier hs-var hs-var">componentLocalName</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725931"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe [(ModuleName, Module)]
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Types.Module.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-158"></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679725933"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-159"></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.Component.html#CLib"><span class="hs-identifier hs-type">CLib</span></a></span><span> </span><span id="local-6989586621679725923"><span class="annot"><span class="annottext">lib :: Library
</span><a href="#local-6989586621679725923"><span class="hs-identifier hs-var">lib</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="Distribution.Types.Library.html#Library"><span class="hs-identifier hs-type">Library</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">libBuildInfo :: Library -&gt; BuildInfo
</span><a href="Distribution.Types.Library.html#libBuildInfo"><span class="hs-identifier hs-var">libBuildInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679725920"><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725920"><span class="hs-identifier hs-var">bi</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-160"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679725919"><span class="annot"><span class="annottext">dirs :: [String]
</span><a href="#local-6989586621679725919"><span class="hs-identifier hs-var hs-var">dirs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#hsSourceDirs"><span class="hs-identifier hs-var hs-var">hsSourceDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725920"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#autogenComponentModulesDir"><span class="hs-identifier hs-var">autogenComponentModulesDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725932"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725931"><span class="hs-identifier hs-var">clbi</span></a></span><span>
</span><span id="line-161"></span><span>                                  </span><span class="hs-special">,</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#autogenPackageModulesDir"><span class="hs-identifier hs-var">autogenPackageModulesDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725932"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-162"></span><span>    </span><span class="annot"><span class="annottext">[String] -&gt; (String -&gt; IO ()) -&gt; IO ()
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Foldable t, Applicative f) =&gt;
t a -&gt; (a -&gt; f b) -&gt; f ()
</span><a href="../../base/src/Data.Foldable.html#for_"><span class="hs-identifier hs-var">for_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(ModuleName -&gt; String) -&gt; [ModuleName] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; String
</span><a href="Distribution.ModuleName.html#toFilePath"><span class="hs-identifier hs-var">ModuleName.toFilePath</span></a></span><span> </span><span class="annot"><span class="annottext">([ModuleName] -&gt; [String]) -&gt; [ModuleName] -&gt; [String]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Library -&gt; ComponentLocalBuildInfo -&gt; [ModuleName]
</span><a href="Distribution.Simple.LocalBuildInfo.html#allLibModules"><span class="hs-identifier hs-var">allLibModules</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679725923"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725931"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">((String -&gt; IO ()) -&gt; IO ()) -&gt; (String -&gt; IO ()) -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-163"></span><span>      </span><span class="annot"><span class="annottext">[String] -&gt; String -&gt; [(String, PreProcessor)] -&gt; String -&gt; IO ()
</span><a href="#local-6989586621679725912"><span class="hs-identifier hs-var">pre</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725919"><span class="hs-identifier hs-var">dirs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; String
</span><a href="Distribution.Simple.LocalBuildInfo.html#componentBuildDir"><span class="hs-identifier hs-var">componentBuildDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725932"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725931"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; [(String, PreProcessor)]
</span><a href="#local-6989586621679725910"><span class="hs-identifier hs-var">localHandlers</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725920"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-164"></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.Component.html#CFLib"><span class="hs-identifier hs-type">CFLib</span></a></span><span> </span><span id="local-6989586621679725908"><span class="annot"><span class="annottext">flib :: ForeignLib
</span><a href="#local-6989586621679725908"><span class="hs-identifier hs-var">flib</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="Distribution.Types.ForeignLib.html#ForeignLib"><span class="hs-identifier hs-type">ForeignLib</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">foreignLibBuildInfo :: ForeignLib -&gt; BuildInfo
</span><a href="Distribution.Types.ForeignLib.html#foreignLibBuildInfo"><span class="hs-identifier hs-var">foreignLibBuildInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679725905"><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725905"><span class="hs-identifier hs-var">bi</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">foreignLibName :: ForeignLib -&gt; UnqualComponentName
</span><a href="Distribution.Types.ForeignLib.html#foreignLibName"><span class="hs-identifier hs-var">foreignLibName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679725903"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679725903"><span class="hs-identifier hs-var">nm</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-165"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679725902"><span class="annot"><span class="annottext">nm' :: String
</span><a href="#local-6989586621679725902"><span class="hs-identifier hs-var hs-var">nm'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; String
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679725903"><span class="hs-identifier hs-var">nm</span></a></span><span>
</span><span id="line-166"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679725900"><span class="annot"><span class="annottext">flibDir :: String
</span><a href="#local-6989586621679725900"><span class="hs-identifier hs-var hs-var">flibDir</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; String
</span><a href="Distribution.Types.LocalBuildInfo.html#buildDir"><span class="hs-identifier hs-var hs-var">buildDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725932"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725902"><span class="hs-identifier hs-var">nm'</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725902"><span class="hs-identifier hs-var">nm'</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-tmp&quot;</span></span><span>
</span><span id="line-167"></span><span>        </span><span id="local-6989586621679725898"><span class="annot"><span class="annottext">dirs :: [String]
</span><a href="#local-6989586621679725898"><span class="hs-identifier hs-var hs-var">dirs</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#hsSourceDirs"><span class="hs-identifier hs-var hs-var">hsSourceDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725905"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#autogenComponentModulesDir"><span class="hs-identifier hs-var">autogenComponentModulesDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725932"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725931"><span class="hs-identifier hs-var">clbi</span></a></span><span>
</span><span id="line-168"></span><span>                                     </span><span class="hs-special">,</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#autogenPackageModulesDir"><span class="hs-identifier hs-var">autogenPackageModulesDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725932"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-169"></span><span>    </span><span class="annot"><span class="annottext">[String] -&gt; (String -&gt; IO ()) -&gt; IO ()
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Foldable t, Applicative f) =&gt;
t a -&gt; (a -&gt; f b) -&gt; f ()
</span><a href="../../base/src/Data.Foldable.html#for_"><span class="hs-identifier hs-var">for_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(ModuleName -&gt; String) -&gt; [ModuleName] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; String
</span><a href="Distribution.ModuleName.html#toFilePath"><span class="hs-identifier hs-var">ModuleName.toFilePath</span></a></span><span> </span><span class="annot"><span class="annottext">([ModuleName] -&gt; [String]) -&gt; [ModuleName] -&gt; [String]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; [ModuleName]
</span><a href="Distribution.Types.ForeignLib.html#foreignLibModules"><span class="hs-identifier hs-var">foreignLibModules</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679725908"><span class="hs-identifier hs-var">flib</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">((String -&gt; IO ()) -&gt; IO ()) -&gt; (String -&gt; IO ()) -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-170"></span><span>      </span><span class="annot"><span class="annottext">[String] -&gt; String -&gt; [(String, PreProcessor)] -&gt; String -&gt; IO ()
</span><a href="#local-6989586621679725912"><span class="hs-identifier hs-var">pre</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725898"><span class="hs-identifier hs-var">dirs</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725900"><span class="hs-identifier hs-var">flibDir</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; [(String, PreProcessor)]
</span><a href="#local-6989586621679725910"><span class="hs-identifier hs-var">localHandlers</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725905"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-171"></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.Component.html#CExe"><span class="hs-identifier hs-type">CExe</span></a></span><span> </span><span id="local-6989586621679725895"><span class="annot"><span class="annottext">exe :: Executable
</span><a href="#local-6989586621679725895"><span class="hs-identifier hs-var">exe</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="Distribution.Types.Executable.html#Executable"><span class="hs-identifier hs-type">Executable</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">buildInfo :: Executable -&gt; BuildInfo
</span><a href="Distribution.Types.Executable.html#buildInfo"><span class="hs-identifier hs-var">buildInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679725892"><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725892"><span class="hs-identifier hs-var">bi</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">exeName :: Executable -&gt; UnqualComponentName
</span><a href="Distribution.Types.Executable.html#exeName"><span class="hs-identifier hs-var">exeName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679725890"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679725890"><span class="hs-identifier hs-var">nm</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-172"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679725889"><span class="annot"><span class="annottext">nm' :: String
</span><a href="#local-6989586621679725889"><span class="hs-identifier hs-var hs-var">nm'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; String
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679725890"><span class="hs-identifier hs-var">nm</span></a></span><span>
</span><span id="line-173"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679725888"><span class="annot"><span class="annottext">exeDir :: String
</span><a href="#local-6989586621679725888"><span class="hs-identifier hs-var hs-var">exeDir</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; String
</span><a href="Distribution.Types.LocalBuildInfo.html#buildDir"><span class="hs-identifier hs-var hs-var">buildDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725932"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725889"><span class="hs-identifier hs-var">nm'</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725889"><span class="hs-identifier hs-var">nm'</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-tmp&quot;</span></span><span>
</span><span id="line-174"></span><span>        </span><span id="local-6989586621679725887"><span class="annot"><span class="annottext">dirs :: [String]
</span><a href="#local-6989586621679725887"><span class="hs-identifier hs-var hs-var">dirs</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#hsSourceDirs"><span class="hs-identifier hs-var hs-var">hsSourceDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725892"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#autogenComponentModulesDir"><span class="hs-identifier hs-var">autogenComponentModulesDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725932"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725931"><span class="hs-identifier hs-var">clbi</span></a></span><span>
</span><span id="line-175"></span><span>                                    </span><span class="hs-special">,</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#autogenPackageModulesDir"><span class="hs-identifier hs-var">autogenPackageModulesDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725932"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-176"></span><span>    </span><span class="annot"><span class="annottext">[String] -&gt; (String -&gt; IO ()) -&gt; IO ()
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Foldable t, Applicative f) =&gt;
t a -&gt; (a -&gt; f b) -&gt; f ()
</span><a href="../../base/src/Data.Foldable.html#for_"><span class="hs-identifier hs-var">for_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(ModuleName -&gt; String) -&gt; [ModuleName] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; String
</span><a href="Distribution.ModuleName.html#toFilePath"><span class="hs-identifier hs-var">ModuleName.toFilePath</span></a></span><span> </span><span class="annot"><span class="annottext">([ModuleName] -&gt; [String]) -&gt; [ModuleName] -&gt; [String]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [ModuleName]
</span><a href="Distribution.Types.BuildInfo.html#otherModules"><span class="hs-identifier hs-var hs-var">otherModules</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725892"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">((String -&gt; IO ()) -&gt; IO ()) -&gt; (String -&gt; IO ()) -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-177"></span><span>      </span><span class="annot"><span class="annottext">[String] -&gt; String -&gt; [(String, PreProcessor)] -&gt; String -&gt; IO ()
</span><a href="#local-6989586621679725912"><span class="hs-identifier hs-var">pre</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725887"><span class="hs-identifier hs-var">dirs</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725888"><span class="hs-identifier hs-var">exeDir</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; [(String, PreProcessor)]
</span><a href="#local-6989586621679725910"><span class="hs-identifier hs-var">localHandlers</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725892"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-178"></span><span>    </span><span class="annot"><span class="annottext">[String] -&gt; String -&gt; [(String, PreProcessor)] -&gt; String -&gt; IO ()
</span><a href="#local-6989586621679725912"><span class="hs-identifier hs-var">pre</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#hsSourceDirs"><span class="hs-identifier hs-var hs-var">hsSourceDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725892"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725888"><span class="hs-identifier hs-var">exeDir</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; [(String, PreProcessor)]
</span><a href="#local-6989586621679725910"><span class="hs-identifier hs-var">localHandlers</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725892"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-179"></span><span>      </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#dropExtensions"><span class="hs-identifier hs-var">dropExtensions</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Executable -&gt; String
</span><a href="Distribution.Types.Executable.html#modulePath"><span class="hs-identifier hs-var hs-var">modulePath</span></a></span><span> </span><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679725895"><span class="hs-identifier hs-var">exe</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-180"></span><span>  </span><span class="annot"><a href="Distribution.Types.Component.html#CTest"><span class="hs-identifier hs-type">CTest</span></a></span><span> </span><span id="local-6989586621679725883"><span class="annot"><span class="annottext">test :: TestSuite
</span><a href="#local-6989586621679725883"><span class="hs-identifier hs-var">test</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="Distribution.Types.TestSuite.html#TestSuite"><span class="hs-identifier hs-type">TestSuite</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">testName :: TestSuite -&gt; UnqualComponentName
</span><a href="Distribution.Types.TestSuite.html#testName"><span class="hs-identifier hs-var">testName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679725880"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679725880"><span class="hs-identifier hs-var">nm</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-181"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679725879"><span class="annot"><span class="annottext">nm' :: String
</span><a href="#local-6989586621679725879"><span class="hs-identifier hs-var hs-var">nm'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; String
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679725880"><span class="hs-identifier hs-var">nm</span></a></span><span>
</span><span id="line-182"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">TestSuite -&gt; TestSuiteInterface
</span><a href="Distribution.Types.TestSuite.html#testInterface"><span class="hs-identifier hs-var hs-var">testInterface</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679725883"><span class="hs-identifier hs-var">test</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-183"></span><span>      </span><span class="annot"><a href="Distribution.Types.TestSuiteInterface.html#TestSuiteExeV10"><span class="hs-identifier hs-type">TestSuiteExeV10</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679725876"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725876"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-184"></span><span>          </span><span class="annot"><span class="annottext">TestSuite -&gt; String -&gt; String -&gt; IO ()
</span><a href="#local-6989586621679725875"><span class="hs-identifier hs-var">preProcessTest</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679725883"><span class="hs-identifier hs-var">test</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725876"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; String
</span><a href="Distribution.Types.LocalBuildInfo.html#buildDir"><span class="hs-identifier hs-var hs-var">buildDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725932"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725879"><span class="hs-identifier hs-var">nm'</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725879"><span class="hs-identifier hs-var">nm'</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-tmp&quot;</span></span><span>
</span><span id="line-185"></span><span>      </span><span class="annot"><a href="Distribution.Types.TestSuiteInterface.html#TestSuiteLibV09"><span class="hs-identifier hs-type">TestSuiteLibV09</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-186"></span><span>          </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679725873"><span class="annot"><span class="annottext">testDir :: String
</span><a href="#local-6989586621679725873"><span class="hs-identifier hs-var hs-var">testDir</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; String
</span><a href="Distribution.Types.LocalBuildInfo.html#buildDir"><span class="hs-identifier hs-var hs-var">buildDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725932"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite -&gt; String
</span><a href="Distribution.Simple.Test.LibV09.html#stubName"><span class="hs-identifier hs-var">stubName</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679725883"><span class="hs-identifier hs-var">test</span></a></span><span>
</span><span id="line-187"></span><span>                  </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite -&gt; String
</span><a href="Distribution.Simple.Test.LibV09.html#stubName"><span class="hs-identifier hs-var">stubName</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679725883"><span class="hs-identifier hs-var">test</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-tmp&quot;</span></span><span>
</span><span id="line-188"></span><span>          </span><span class="annot"><span class="annottext">TestSuite -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Test.LibV09.html#writeSimpleTestStub"><span class="hs-identifier hs-var">writeSimpleTestStub</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679725883"><span class="hs-identifier hs-var">test</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725873"><span class="hs-identifier hs-var">testDir</span></a></span><span>
</span><span id="line-189"></span><span>          </span><span class="annot"><span class="annottext">TestSuite -&gt; String -&gt; String -&gt; IO ()
</span><a href="#local-6989586621679725875"><span class="hs-identifier hs-var">preProcessTest</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679725883"><span class="hs-identifier hs-var">test</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TestSuite -&gt; String
</span><a href="Distribution.Simple.Test.LibV09.html#stubFilePath"><span class="hs-identifier hs-var">stubFilePath</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679725883"><span class="hs-identifier hs-var">test</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725873"><span class="hs-identifier hs-var">testDir</span></a></span><span>
</span><span id="line-190"></span><span>      </span><span class="annot"><a href="Distribution.Types.TestSuiteInterface.html#TestSuiteUnsupported"><span class="hs-identifier hs-type">TestSuiteUnsupported</span></a></span><span> </span><span id="local-6989586621679725868"><span class="annot"><span class="annottext">TestType
</span><a href="#local-6989586621679725868"><span class="hs-identifier hs-var">tt</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-191"></span><span>          </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
forall a. Verbosity -&gt; String -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725929"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;No support for preprocessing test &quot;</span></span><span>
</span><span id="line-192"></span><span>                        </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;suite type &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">TestType -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">TestType
</span><a href="#local-6989586621679725868"><span class="hs-identifier hs-var">tt</span></a></span><span>
</span><span id="line-193"></span><span>  </span><span class="annot"><a href="Distribution.Types.Component.html#CBench"><span class="hs-identifier hs-type">CBench</span></a></span><span> </span><span id="local-6989586621679725864"><span class="annot"><span class="annottext">bm :: Benchmark
</span><a href="#local-6989586621679725864"><span class="hs-identifier hs-var">bm</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="Distribution.Types.Benchmark.html#Benchmark"><span class="hs-identifier hs-type">Benchmark</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">benchmarkName :: Benchmark -&gt; UnqualComponentName
</span><a href="Distribution.Types.Benchmark.html#benchmarkName"><span class="hs-identifier hs-var">benchmarkName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679725861"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679725861"><span class="hs-identifier hs-var">nm</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-194"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679725860"><span class="annot"><span class="annottext">nm' :: String
</span><a href="#local-6989586621679725860"><span class="hs-identifier hs-var hs-var">nm'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; String
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679725861"><span class="hs-identifier hs-var">nm</span></a></span><span>
</span><span id="line-195"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Benchmark -&gt; BenchmarkInterface
</span><a href="Distribution.Types.Benchmark.html#benchmarkInterface"><span class="hs-identifier hs-var hs-var">benchmarkInterface</span></a></span><span> </span><span class="annot"><span class="annottext">Benchmark
</span><a href="#local-6989586621679725864"><span class="hs-identifier hs-var">bm</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-196"></span><span>      </span><span class="annot"><a href="Distribution.Types.BenchmarkInterface.html#BenchmarkExeV10"><span class="hs-identifier hs-type">BenchmarkExeV10</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679725857"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725857"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-197"></span><span>          </span><span class="annot"><span class="annottext">Benchmark -&gt; String -&gt; String -&gt; IO ()
</span><a href="#local-6989586621679725856"><span class="hs-identifier hs-var">preProcessBench</span></a></span><span> </span><span class="annot"><span class="annottext">Benchmark
</span><a href="#local-6989586621679725864"><span class="hs-identifier hs-var">bm</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725857"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; String
</span><a href="Distribution.Types.LocalBuildInfo.html#buildDir"><span class="hs-identifier hs-var hs-var">buildDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725932"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725860"><span class="hs-identifier hs-var">nm'</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725860"><span class="hs-identifier hs-var">nm'</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-tmp&quot;</span></span><span>
</span><span id="line-198"></span><span>      </span><span class="annot"><a href="Distribution.Types.BenchmarkInterface.html#BenchmarkUnsupported"><span class="hs-identifier hs-type">BenchmarkUnsupported</span></a></span><span> </span><span id="local-6989586621679725854"><span class="annot"><span class="annottext">BenchmarkType
</span><a href="#local-6989586621679725854"><span class="hs-identifier hs-var">tt</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-199"></span><span>          </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
forall a. Verbosity -&gt; String -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725929"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;No support for preprocessing benchmark &quot;</span></span><span>
</span><span id="line-200"></span><span>                        </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;type &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">BenchmarkType -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">BenchmarkType
</span><a href="#local-6989586621679725854"><span class="hs-identifier hs-var">tt</span></a></span><span>
</span><span id="line-201"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-202"></span><span>    </span><span id="local-6989586621679725853"><span class="annot"><span class="annottext">builtinHaskellSuffixes :: [String]
</span><a href="#local-6989586621679725853"><span class="hs-identifier hs-var hs-var">builtinHaskellSuffixes</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hs&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lhs&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hsig&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lhsig&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-203"></span><span>    </span><span id="local-6989586621679725852"><span class="annot"><span class="annottext">builtinCSuffixes :: [String]
</span><a href="#local-6989586621679725852"><span class="hs-identifier hs-var hs-var">builtinCSuffixes</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="Distribution.Simple.CCompiler.html#cSourceExtensions"><span class="hs-identifier hs-var">cSourceExtensions</span></a></span><span>
</span><span id="line-204"></span><span>    </span><span id="local-6989586621679725850"><span class="annot"><span class="annottext">builtinSuffixes :: [String]
</span><a href="#local-6989586621679725850"><span class="hs-identifier hs-var hs-var">builtinSuffixes</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725853"><span class="hs-identifier hs-var">builtinHaskellSuffixes</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725852"><span class="hs-identifier hs-var">builtinCSuffixes</span></a></span><span>
</span><span id="line-205"></span><span>    </span><span id="local-6989586621679725910"><span class="annot"><span class="annottext">localHandlers :: BuildInfo -&gt; [(String, PreProcessor)]
</span><a href="#local-6989586621679725910"><span class="hs-identifier hs-var hs-var">localHandlers</span></a></span></span><span> </span><span id="local-6989586621679725849"><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725849"><span class="hs-identifier hs-var">bi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725848"><span class="hs-identifier hs-var">ext</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">BuildInfo
-&gt; LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; PreProcessor
</span><a href="#local-6989586621679725847"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725849"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725932"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725931"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679725848"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725848"><span class="hs-identifier hs-var">ext</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679725847"><span class="annot"><span class="annottext">BuildInfo
-&gt; LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; PreProcessor
</span><a href="#local-6989586621679725847"><span class="hs-identifier hs-var">h</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[PPSuffixHandler]
</span><a href="#local-6989586621679725928"><span class="hs-identifier hs-var">handlers</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-206"></span><span>    </span><span id="local-6989586621679725912"><span class="annot"><span class="annottext">pre :: [String] -&gt; String -&gt; [(String, PreProcessor)] -&gt; String -&gt; IO ()
</span><a href="#local-6989586621679725912"><span class="hs-identifier hs-var hs-var">pre</span></a></span></span><span> </span><span id="local-6989586621679725846"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725846"><span class="hs-identifier hs-var">dirs</span></a></span></span><span> </span><span id="local-6989586621679725845"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725845"><span class="hs-identifier hs-var">dir</span></a></span></span><span> </span><span id="local-6989586621679725844"><span class="annot"><span class="annottext">[(String, PreProcessor)]
</span><a href="#local-6989586621679725844"><span class="hs-identifier hs-var">lhndlrs</span></a></span></span><span> </span><span id="local-6989586621679725843"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725843"><span class="hs-identifier hs-var">fp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-207"></span><span>      </span><span class="annot"><span class="annottext">[String]
-&gt; String
-&gt; Bool
-&gt; String
-&gt; Verbosity
-&gt; [String]
-&gt; [(String, PreProcessor)]
-&gt; IO ()
</span><a href="Distribution.Simple.PreProcess.html#preprocessFile"><span class="hs-identifier hs-var">preprocessFile</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725846"><span class="hs-identifier hs-var">dirs</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725845"><span class="hs-identifier hs-var">dir</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725930"><span class="hs-identifier hs-var">isSrcDist</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725843"><span class="hs-identifier hs-var">fp</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725929"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725850"><span class="hs-identifier hs-var">builtinSuffixes</span></a></span><span> </span><span class="annot"><span class="annottext">[(String, PreProcessor)]
</span><a href="#local-6989586621679725844"><span class="hs-identifier hs-var">lhndlrs</span></a></span><span>
</span><span id="line-208"></span><span>    </span><span id="local-6989586621679725875"><span class="annot"><span class="annottext">preProcessTest :: TestSuite -&gt; String -&gt; String -&gt; IO ()
</span><a href="#local-6989586621679725875"><span class="hs-identifier hs-var hs-var">preProcessTest</span></a></span></span><span> </span><span id="local-6989586621679725841"><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679725841"><span class="hs-identifier hs-var">test</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [ModuleName] -&gt; String -&gt; String -&gt; IO ()
</span><a href="#local-6989586621679725840"><span class="hs-identifier hs-var">preProcessComponent</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TestSuite -&gt; BuildInfo
</span><a href="Distribution.Types.TestSuite.html#testBuildInfo"><span class="hs-identifier hs-var hs-var">testBuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679725841"><span class="hs-identifier hs-var">test</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-209"></span><span>                          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TestSuite -&gt; [ModuleName]
</span><a href="Distribution.Types.TestSuite.html#testModules"><span class="hs-identifier hs-var">testModules</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679725841"><span class="hs-identifier hs-var">test</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-210"></span><span>    </span><span id="local-6989586621679725856"><span class="annot"><span class="annottext">preProcessBench :: Benchmark -&gt; String -&gt; String -&gt; IO ()
</span><a href="#local-6989586621679725856"><span class="hs-identifier hs-var hs-var">preProcessBench</span></a></span></span><span> </span><span id="local-6989586621679725837"><span class="annot"><span class="annottext">Benchmark
</span><a href="#local-6989586621679725837"><span class="hs-identifier hs-var">bm</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [ModuleName] -&gt; String -&gt; String -&gt; IO ()
</span><a href="#local-6989586621679725840"><span class="hs-identifier hs-var">preProcessComponent</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Benchmark -&gt; BuildInfo
</span><a href="Distribution.Types.Benchmark.html#benchmarkBuildInfo"><span class="hs-identifier hs-var hs-var">benchmarkBuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Benchmark
</span><a href="#local-6989586621679725837"><span class="hs-identifier hs-var">bm</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-211"></span><span>                         </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Benchmark -&gt; [ModuleName]
</span><a href="Distribution.Types.Benchmark.html#benchmarkModules"><span class="hs-identifier hs-var">benchmarkModules</span></a></span><span> </span><span class="annot"><span class="annottext">Benchmark
</span><a href="#local-6989586621679725837"><span class="hs-identifier hs-var">bm</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-212"></span><span>    </span><span id="local-6989586621679725840"><span class="annot"><span class="annottext">preProcessComponent :: BuildInfo -&gt; [ModuleName] -&gt; String -&gt; String -&gt; IO ()
</span><a href="#local-6989586621679725840"><span class="hs-identifier hs-var hs-var">preProcessComponent</span></a></span></span><span> </span><span id="local-6989586621679725831"><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725831"><span class="hs-identifier hs-var">bi</span></a></span></span><span> </span><span id="local-6989586621679725830"><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679725830"><span class="hs-identifier hs-var">modules</span></a></span></span><span> </span><span id="local-6989586621679725829"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725829"><span class="hs-identifier hs-var">exePath</span></a></span></span><span> </span><span id="local-6989586621679725828"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725828"><span class="hs-identifier hs-var">dir</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-213"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679725827"><span class="annot"><span class="annottext">biHandlers :: [(String, PreProcessor)]
</span><a href="#local-6989586621679725827"><span class="hs-identifier hs-var hs-var">biHandlers</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [(String, PreProcessor)]
</span><a href="#local-6989586621679725910"><span class="hs-identifier hs-var">localHandlers</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725831"><span class="hs-identifier hs-var">bi</span></a></span><span>
</span><span id="line-214"></span><span>            </span><span id="local-6989586621679725826"><span class="annot"><span class="annottext">sourceDirs :: [String]
</span><a href="#local-6989586621679725826"><span class="hs-identifier hs-var hs-var">sourceDirs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#hsSourceDirs"><span class="hs-identifier hs-var hs-var">hsSourceDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725831"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#autogenComponentModulesDir"><span class="hs-identifier hs-var">autogenComponentModulesDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725932"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725931"><span class="hs-identifier hs-var">clbi</span></a></span><span>
</span><span id="line-215"></span><span>                                            </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#autogenPackageModulesDir"><span class="hs-identifier hs-var">autogenPackageModulesDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725932"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-216"></span><span>        </span><span class="annot"><span class="annottext">[IO ()] -&gt; IO ()
forall (t :: * -&gt; *) (m :: * -&gt; *) a.
(Foldable t, Monad m) =&gt;
t (m a) -&gt; m ()
</span><a href="../../base/src/Data.Foldable.html#sequence_"><span class="hs-identifier hs-var">sequence_</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">[String]
-&gt; String
-&gt; Bool
-&gt; String
-&gt; Verbosity
-&gt; [String]
-&gt; [(String, PreProcessor)]
-&gt; IO ()
</span><a href="Distribution.Simple.PreProcess.html#preprocessFile"><span class="hs-identifier hs-var">preprocessFile</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725826"><span class="hs-identifier hs-var">sourceDirs</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725828"><span class="hs-identifier hs-var">dir</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725930"><span class="hs-identifier hs-var">isSrcDist</span></a></span><span>
</span><span id="line-217"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName -&gt; String
</span><a href="Distribution.ModuleName.html#toFilePath"><span class="hs-identifier hs-var">ModuleName.toFilePath</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679725824"><span class="hs-identifier hs-var">modu</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725929"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725850"><span class="hs-identifier hs-var">builtinSuffixes</span></a></span><span>
</span><span id="line-218"></span><span>                </span><span class="annot"><span class="annottext">[(String, PreProcessor)]
</span><a href="#local-6989586621679725827"><span class="hs-identifier hs-var">biHandlers</span></a></span><span>
</span><span id="line-219"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679725824"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679725824"><span class="hs-identifier hs-var">modu</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679725830"><span class="hs-identifier hs-var">modules</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-220"></span><span>        </span><span class="annot"><span class="annottext">[String]
-&gt; String
-&gt; Bool
-&gt; String
-&gt; Verbosity
-&gt; [String]
-&gt; [(String, PreProcessor)]
-&gt; IO ()
</span><a href="Distribution.Simple.PreProcess.html#preprocessFile"><span class="hs-identifier hs-var">preprocessFile</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725828"><span class="hs-identifier hs-var">dir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#hsSourceDirs"><span class="hs-identifier hs-var hs-var">hsSourceDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725831"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725828"><span class="hs-identifier hs-var">dir</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725930"><span class="hs-identifier hs-var">isSrcDist</span></a></span><span>
</span><span id="line-221"></span><span>            </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#dropExtensions"><span class="hs-identifier hs-var">dropExtensions</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; String -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725829"><span class="hs-identifier hs-var">exePath</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725929"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-222"></span><span>            </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725850"><span class="hs-identifier hs-var">builtinSuffixes</span></a></span><span> </span><span class="annot"><span class="annottext">[(String, PreProcessor)]
</span><a href="#local-6989586621679725827"><span class="hs-identifier hs-var">biHandlers</span></a></span><span>
</span><span id="line-223"></span><span>
</span><span id="line-224"></span><span class="hs-comment">--TODO: try to list all the modules that could not be found</span><span>
</span><span id="line-225"></span><span class="hs-comment">--      not just the first one. It's annoying and slow due to the need</span><span>
</span><span id="line-226"></span><span class="hs-comment">--      to reconfigure after editing the .cabal file each time.</span><span>
</span><span id="line-227"></span><span>
</span><span id="line-228"></span><span class="hs-comment">-- |Find the first extension of the file that exists, and preprocess it</span><span>
</span><span id="line-229"></span><span class="hs-comment">-- if required.</span><span>
</span><span id="line-230"></span><span class="annot"><a href="Distribution.Simple.PreProcess.html#preprocessFile"><span class="hs-identifier hs-type">preprocessFile</span></a></span><span>
</span><span id="line-231"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span>               </span><span class="hs-comment">-- ^source directories</span><span>
</span><span id="line-232"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>                 </span><span class="hs-comment">-- ^build directory</span><span>
</span><span id="line-233"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>                     </span><span class="hs-comment">-- ^preprocess for sdist</span><span>
</span><span id="line-234"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>                 </span><span class="hs-comment">-- ^module file name</span><span>
</span><span id="line-235"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>                </span><span class="hs-comment">-- ^verbosity</span><span>
</span><span id="line-236"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>                 </span><span class="hs-comment">-- ^builtin suffixes</span><span>
</span><span id="line-237"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#PreProcessor"><span class="hs-identifier hs-type">PreProcessor</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-comment">-- ^possible preprocessors</span><span>
</span><span id="line-238"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-239"></span><span id="preprocessFile"><span class="annot"><span class="annottext">preprocessFile :: [String]
-&gt; String
-&gt; Bool
-&gt; String
-&gt; Verbosity
-&gt; [String]
-&gt; [(String, PreProcessor)]
-&gt; IO ()
</span><a href="Distribution.Simple.PreProcess.html#preprocessFile"><span class="hs-identifier hs-var hs-var">preprocessFile</span></a></span></span><span> </span><span id="local-6989586621679725823"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725823"><span class="hs-identifier hs-var">searchLoc</span></a></span></span><span> </span><span id="local-6989586621679725822"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725822"><span class="hs-identifier hs-var">buildLoc</span></a></span></span><span> </span><span id="local-6989586621679725821"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725821"><span class="hs-identifier hs-var">forSDist</span></a></span></span><span> </span><span id="local-6989586621679725820"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725820"><span class="hs-identifier hs-var">baseFile</span></a></span></span><span> </span><span id="local-6989586621679725819"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725819"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679725818"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725818"><span class="hs-identifier hs-var">builtinSuffixes</span></a></span></span><span> </span><span id="local-6989586621679725817"><span class="annot"><span class="annottext">[(String, PreProcessor)]
</span><a href="#local-6989586621679725817"><span class="hs-identifier hs-var">handlers</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-240"></span><span>    </span><span class="hs-comment">-- look for files in the various source dirs with this module name</span><span>
</span><span id="line-241"></span><span>    </span><span class="hs-comment">-- and a file extension of a known preprocessor</span><span>
</span><span id="line-242"></span><span>    </span><span id="local-6989586621679725816"><span class="annot"><span class="annottext">Maybe (String, String)
</span><a href="#local-6989586621679725816"><span class="hs-identifier hs-var">psrcFiles</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; String -&gt; IO (Maybe (String, String))
</span><a href="Distribution.Simple.Utils.html#findFileWithExtension%27"><span class="hs-identifier hs-var">findFileWithExtension'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((String, PreProcessor) -&gt; String)
-&gt; [(String, PreProcessor)] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(String, PreProcessor) -&gt; String
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="annot"><span class="annottext">[(String, PreProcessor)]
</span><a href="#local-6989586621679725817"><span class="hs-identifier hs-var">handlers</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725823"><span class="hs-identifier hs-var">searchLoc</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725820"><span class="hs-identifier hs-var">baseFile</span></a></span><span>
</span><span id="line-243"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe (String, String)
</span><a href="#local-6989586621679725816"><span class="hs-identifier hs-var">psrcFiles</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-244"></span><span>        </span><span class="hs-comment">-- no preprocessor file exists, look for an ordinary source file</span><span>
</span><span id="line-245"></span><span>        </span><span class="hs-comment">-- just to make sure one actually exists at all for this module.</span><span>
</span><span id="line-246"></span><span>        </span><span class="hs-comment">-- Note: by looking in the target/output build dir too, we allow</span><span>
</span><span id="line-247"></span><span>        </span><span class="hs-comment">-- source files to appear magically in the target build dir without</span><span>
</span><span id="line-248"></span><span>        </span><span class="hs-comment">-- any corresponding &quot;real&quot; source file. This lets custom Setup.hs</span><span>
</span><span id="line-249"></span><span>        </span><span class="hs-comment">-- files generate source modules directly into the build dir without</span><span>
</span><span id="line-250"></span><span>        </span><span class="hs-comment">-- the rest of the build system being aware of it (somewhat dodgy)</span><span>
</span><span id="line-251"></span><span>      </span><span class="annot"><span class="annottext">Maybe (String, String)
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-252"></span><span>                 </span><span id="local-6989586621679725814"><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679725814"><span class="hs-identifier hs-var">bsrcFiles</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; String -&gt; IO (Maybe String)
</span><a href="Distribution.Simple.Utils.html#findFileWithExtension"><span class="hs-identifier hs-var">findFileWithExtension</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725818"><span class="hs-identifier hs-var">builtinSuffixes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725822"><span class="hs-identifier hs-var">buildLoc</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725823"><span class="hs-identifier hs-var">searchLoc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725820"><span class="hs-identifier hs-var">baseFile</span></a></span><span>
</span><span id="line-253"></span><span>                 </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679725814"><span class="hs-identifier hs-var">bsrcFiles</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-254"></span><span>                  </span><span class="annot"><span class="annottext">Maybe String
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-255"></span><span>                    </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
forall a. Verbosity -&gt; String -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725819"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;can't find source for &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725820"><span class="hs-identifier hs-var">baseFile</span></a></span><span>
</span><span id="line-256"></span><span>                                  </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; in &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; String
forall a. [a] -&gt; [[a]] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#intercalate"><span class="hs-identifier hs-var">intercalate</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;, &quot;</span></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725823"><span class="hs-identifier hs-var">searchLoc</span></a></span><span>
</span><span id="line-257"></span><span>                  </span><span class="annot"><span class="annottext">Maybe String
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-258"></span><span>        </span><span class="hs-comment">-- found a pre-processable file in one of the source dirs</span><span>
</span><span id="line-259"></span><span>      </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679725811"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725811"><span class="hs-identifier hs-var">psrcLoc</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679725810"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725810"><span class="hs-identifier hs-var">psrcRelFile</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-260"></span><span>            </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679725809"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725809"><span class="hs-identifier hs-var">srcStem</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679725808"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725808"><span class="hs-identifier hs-var">ext</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; (String, String)
</span><a href="../../filepath/src/System.FilePath.Windows.html#splitExtension"><span class="hs-identifier hs-var">splitExtension</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725810"><span class="hs-identifier hs-var">psrcRelFile</span></a></span><span>
</span><span id="line-261"></span><span>                </span><span id="local-6989586621679725807"><span class="annot"><span class="annottext">psrcFile :: String
</span><a href="#local-6989586621679725807"><span class="hs-identifier hs-var hs-var">psrcFile</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725811"><span class="hs-identifier hs-var">psrcLoc</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725810"><span class="hs-identifier hs-var">psrcRelFile</span></a></span><span>
</span><span id="line-262"></span><span>                </span><span id="local-6989586621679725802"><span class="annot"><span class="annottext">pp :: PreProcessor
</span><a href="#local-6989586621679725802"><span class="hs-identifier hs-var hs-var">pp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PreProcessor -&gt; Maybe PreProcessor -&gt; PreProcessor
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; PreProcessor
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Distribution.Simple.PreProcess: Just expected&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-263"></span><span>                               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; [(String, PreProcessor)] -&gt; Maybe PreProcessor
forall a b. Eq a =&gt; a -&gt; [(a, b)] -&gt; Maybe b
</span><a href="../../base/src/GHC.List.html#lookup"><span class="hs-identifier hs-var">lookup</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String
forall a. [a] -&gt; [a]
</span><a href="Distribution.Utils.Generic.html#safeTail"><span class="hs-identifier hs-var">safeTail</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725808"><span class="hs-identifier hs-var">ext</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[(String, PreProcessor)]
</span><a href="#local-6989586621679725817"><span class="hs-identifier hs-var">handlers</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-264"></span><span>            </span><span class="hs-comment">-- Preprocessing files for 'sdist' is different from preprocessing</span><span>
</span><span id="line-265"></span><span>            </span><span class="hs-comment">-- for 'build'.  When preprocessing for sdist we preprocess to</span><span>
</span><span id="line-266"></span><span>            </span><span class="hs-comment">-- avoid that the user has to have the preprocessors available.</span><span>
</span><span id="line-267"></span><span>            </span><span class="hs-comment">-- ATM, we don't have a way to specify which files are to be</span><span>
</span><span id="line-268"></span><span>            </span><span class="hs-comment">-- preprocessed and which not, so for sdist we only process</span><span>
</span><span id="line-269"></span><span>            </span><span class="hs-comment">-- platform independent files and put them into the 'buildLoc'</span><span>
</span><span id="line-270"></span><span>            </span><span class="hs-comment">-- (which we assume is set to the temp. directory that will become</span><span>
</span><span id="line-271"></span><span>            </span><span class="hs-comment">-- the tarball).</span><span>
</span><span id="line-272"></span><span>            </span><span class="hs-comment">--TODO: eliminate sdist variant, just supply different handlers</span><span>
</span><span id="line-273"></span><span>            </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725821"><span class="hs-identifier hs-var">forSDist</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725821"><span class="hs-identifier hs-var">forSDist</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">PreProcessor -&gt; Bool
</span><a href="Distribution.Simple.PreProcess.html#platformIndependent"><span class="hs-identifier hs-var hs-var">platformIndependent</span></a></span><span> </span><span class="annot"><span class="annottext">PreProcessor
</span><a href="#local-6989586621679725802"><span class="hs-identifier hs-var">pp</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-274"></span><span>              </span><span class="hs-comment">-- look for existing pre-processed source file in the dest dir to</span><span>
</span><span id="line-275"></span><span>              </span><span class="hs-comment">-- see if we really have to re-run the preprocessor.</span><span>
</span><span id="line-276"></span><span>              </span><span id="local-6989586621679725793"><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679725793"><span class="hs-identifier hs-var">ppsrcFiles</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; String -&gt; IO (Maybe String)
</span><a href="Distribution.Simple.Utils.html#findFileWithExtension"><span class="hs-identifier hs-var">findFileWithExtension</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725818"><span class="hs-identifier hs-var">builtinSuffixes</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725822"><span class="hs-identifier hs-var">buildLoc</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725820"><span class="hs-identifier hs-var">baseFile</span></a></span><span>
</span><span id="line-277"></span><span>              </span><span id="local-6989586621679725792"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725792"><span class="hs-identifier hs-var">recomp</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679725793"><span class="hs-identifier hs-var">ppsrcFiles</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-278"></span><span>                          </span><span class="annot"><span class="annottext">Maybe String
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; IO Bool
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-279"></span><span>                          </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679725791"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725791"><span class="hs-identifier hs-var">ppsrcFile</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-280"></span><span>                              </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725807"><span class="hs-identifier hs-var">psrcFile</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; IO Bool
</span><a href="Distribution.Simple.Utils.html#moreRecentFile"><span class="hs-operator hs-var">`moreRecentFile`</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725791"><span class="hs-identifier hs-var">ppsrcFile</span></a></span><span>
</span><span id="line-281"></span><span>              </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725792"><span class="hs-identifier hs-var">recomp</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-282"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679725789"><span class="annot"><span class="annottext">destDir :: String
</span><a href="#local-6989586621679725789"><span class="hs-identifier hs-var hs-var">destDir</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725822"><span class="hs-identifier hs-var">buildLoc</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621679725788"><span class="hs-identifier hs-var">dirName</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725809"><span class="hs-identifier hs-var">srcStem</span></a></span><span>
</span><span id="line-283"></span><span>                </span><span class="annot"><span class="annottext">Verbosity -&gt; Bool -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#createDirectoryIfMissingVerbose"><span class="hs-identifier hs-var">createDirectoryIfMissingVerbose</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725819"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725789"><span class="hs-identifier hs-var">destDir</span></a></span><span>
</span><span id="line-284"></span><span>                </span><span class="annot"><span class="annottext">PreProcessor -&gt; (String, String) -&gt; (String, String) -&gt; IO ()
</span><a href="#local-6989586621679725786"><span class="hs-identifier hs-var">runPreProcessorWithHsBootHack</span></a></span><span> </span><span class="annot"><span class="annottext">PreProcessor
</span><a href="#local-6989586621679725802"><span class="hs-identifier hs-var">pp</span></a></span><span>
</span><span id="line-285"></span><span>                   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725811"><span class="hs-identifier hs-var">psrcLoc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725810"><span class="hs-identifier hs-var">psrcRelFile</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-286"></span><span>                   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725822"><span class="hs-identifier hs-var">buildLoc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725809"><span class="hs-identifier hs-var">srcStem</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator hs-var">&lt;.&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hs&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-287"></span><span>
</span><span id="line-288"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-289"></span><span>    </span><span id="local-6989586621679725788"><span class="annot"><span class="annottext">dirName :: String -&gt; String
</span><a href="#local-6989586621679725788"><span class="hs-identifier hs-var hs-var">dirName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeDirectory"><span class="hs-identifier hs-var">takeDirectory</span></a></span><span>
</span><span id="line-290"></span><span>
</span><span id="line-291"></span><span>    </span><span class="hs-comment">-- FIXME: This is a somewhat nasty hack. GHC requires that hs-boot files</span><span>
</span><span id="line-292"></span><span>    </span><span class="hs-comment">-- be in the same place as the hs files, so if we put the hs file in dist/</span><span>
</span><span id="line-293"></span><span>    </span><span class="hs-comment">-- then we need to copy the hs-boot file there too. This should probably be</span><span>
</span><span id="line-294"></span><span>    </span><span class="hs-comment">-- done another way. Possibly we should also be looking for .lhs-boot</span><span>
</span><span id="line-295"></span><span>    </span><span class="hs-comment">-- files, but I think that preprocessors only produce .hs files.</span><span>
</span><span id="line-296"></span><span>    </span><span id="local-6989586621679725786"><span class="annot"><span class="annottext">runPreProcessorWithHsBootHack :: PreProcessor -&gt; (String, String) -&gt; (String, String) -&gt; IO ()
</span><a href="#local-6989586621679725786"><span class="hs-identifier hs-var hs-var">runPreProcessorWithHsBootHack</span></a></span></span><span> </span><span id="local-6989586621679725782"><span class="annot"><span class="annottext">PreProcessor
</span><a href="#local-6989586621679725782"><span class="hs-identifier hs-var">pp</span></a></span></span><span>
</span><span id="line-297"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621679725781"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725781"><span class="hs-identifier hs-var">inBaseDir</span></a></span></span><span class="hs-special">,</span><span>  </span><span id="local-6989586621679725780"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725780"><span class="hs-identifier hs-var">inRelativeFile</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-298"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621679725779"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725779"><span class="hs-identifier hs-var">outBaseDir</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679725778"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725778"><span class="hs-identifier hs-var">outRelativeFile</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-299"></span><span>        </span><span class="annot"><span class="annottext">PreProcessor
-&gt; (String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ()
</span><a href="Distribution.Simple.PreProcess.html#runPreProcessor"><span class="hs-identifier hs-var hs-var">runPreProcessor</span></a></span><span> </span><span class="annot"><span class="annottext">PreProcessor
</span><a href="#local-6989586621679725782"><span class="hs-identifier hs-var">pp</span></a></span><span>
</span><span id="line-300"></span><span>          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725781"><span class="hs-identifier hs-var">inBaseDir</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725780"><span class="hs-identifier hs-var">inRelativeFile</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-301"></span><span>          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725779"><span class="hs-identifier hs-var">outBaseDir</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725778"><span class="hs-identifier hs-var">outRelativeFile</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725819"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-302"></span><span>
</span><span id="line-303"></span><span>        </span><span id="local-6989586621679725777"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725777"><span class="hs-identifier hs-var">exists</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO Bool
</span><a href="../../directory/src/System.Directory.html#doesFileExist"><span class="hs-identifier hs-var">doesFileExist</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725776"><span class="hs-identifier hs-var">inBoot</span></a></span><span>
</span><span id="line-304"></span><span>        </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725777"><span class="hs-identifier hs-var">exists</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#copyFileVerbose"><span class="hs-identifier hs-var">copyFileVerbose</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725819"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725776"><span class="hs-identifier hs-var">inBoot</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725774"><span class="hs-identifier hs-var">outBoot</span></a></span><span>
</span><span id="line-305"></span><span>
</span><span id="line-306"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-307"></span><span>        </span><span id="local-6989586621679725776"><span class="annot"><span class="annottext">inBoot :: String
</span><a href="#local-6989586621679725776"><span class="hs-identifier hs-var hs-var">inBoot</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#replaceExtension"><span class="hs-identifier hs-var">replaceExtension</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725773"><span class="hs-identifier hs-var">inFile</span></a></span><span>  </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hs-boot&quot;</span></span><span>
</span><span id="line-308"></span><span>        </span><span id="local-6989586621679725774"><span class="annot"><span class="annottext">outBoot :: String
</span><a href="#local-6989586621679725774"><span class="hs-identifier hs-var hs-var">outBoot</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#replaceExtension"><span class="hs-identifier hs-var">replaceExtension</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725772"><span class="hs-identifier hs-var">outFile</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hs-boot&quot;</span></span><span>
</span><span id="line-309"></span><span>
</span><span id="line-310"></span><span>        </span><span id="local-6989586621679725773"><span class="annot"><span class="annottext">inFile :: String
</span><a href="#local-6989586621679725773"><span class="hs-identifier hs-var hs-var">inFile</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#normalise"><span class="hs-identifier hs-var">normalise</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725781"><span class="hs-identifier hs-var">inBaseDir</span></a></span><span>  </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725780"><span class="hs-identifier hs-var">inRelativeFile</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-311"></span><span>        </span><span id="local-6989586621679725772"><span class="annot"><span class="annottext">outFile :: String
</span><a href="#local-6989586621679725772"><span class="hs-identifier hs-var hs-var">outFile</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#normalise"><span class="hs-identifier hs-var">normalise</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725779"><span class="hs-identifier hs-var">outBaseDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725778"><span class="hs-identifier hs-var">outRelativeFile</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-312"></span><span>
</span><span id="line-313"></span><span class="hs-comment">-- ------------------------------------------------------------</span><span>
</span><span id="line-314"></span><span class="hs-comment">-- * known preprocessors</span><span>
</span><span id="line-315"></span><span class="hs-comment">-- ------------------------------------------------------------</span><span>
</span><span id="line-316"></span><span>
</span><span id="line-317"></span><span class="annot"><a href="Distribution.Simple.PreProcess.html#ppGreenCard"><span class="hs-identifier hs-type">ppGreenCard</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.BuildInfo.html#BuildInfo"><span class="hs-identifier hs-type">BuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#PreProcessor"><span class="hs-identifier hs-type">PreProcessor</span></a></span><span>
</span><span id="line-318"></span><span id="ppGreenCard"><span class="annot"><span class="annottext">ppGreenCard :: BuildInfo
-&gt; LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#ppGreenCard"><span class="hs-identifier hs-var hs-var">ppGreenCard</span></a></span></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679725771"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725771"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><span class="hs-identifier">_</span></span><span>
</span><span id="line-319"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PreProcessor :: Bool
-&gt; ((String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ())
-&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#PreProcessor"><span class="hs-identifier hs-type">PreProcessor</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-320"></span><span>        </span><span class="annot"><span class="annottext">platformIndependent :: Bool
</span><a href="Distribution.Simple.PreProcess.html#platformIndependent"><span class="hs-identifier hs-var">platformIndependent</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">,</span><span>
</span><span id="line-321"></span><span>        </span><span class="annot"><span class="annottext">runPreProcessor :: (String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ()
</span><a href="Distribution.Simple.PreProcess.html#runPreProcessor"><span class="hs-identifier hs-var">runPreProcessor</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; String -&gt; Verbosity -&gt; IO ())
-&gt; (String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ()
</span><a href="Distribution.Simple.PreProcess.html#mkSimplePreProcessor"><span class="hs-identifier hs-var">mkSimplePreProcessor</span></a></span><span> </span><span class="annot"><span class="annottext">((String -&gt; String -&gt; Verbosity -&gt; IO ())
 -&gt; (String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ())
-&gt; (String -&gt; String -&gt; Verbosity -&gt; IO ())
-&gt; (String, String)
-&gt; (String, String)
-&gt; Verbosity
-&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679725770"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725770"><span class="hs-identifier hs-var">inFile</span></a></span></span><span> </span><span id="local-6989586621679725769"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725769"><span class="hs-identifier hs-var">outFile</span></a></span></span><span> </span><span id="local-6989586621679725768"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725768"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-322"></span><span>          </span><span class="annot"><span class="annottext">Verbosity -&gt; Program -&gt; ProgramDb -&gt; [String] -&gt; IO ()
</span><a href="Distribution.Simple.Program.html#runDbProgram"><span class="hs-identifier hs-var">runDbProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725768"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#greencardProgram"><span class="hs-identifier hs-var">greencardProgram</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ProgramDb
</span><a href="Distribution.Types.LocalBuildInfo.html#withPrograms"><span class="hs-identifier hs-var hs-var">withPrograms</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725771"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-323"></span><span>              </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-tffi&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-o&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725769"><span class="hs-identifier hs-var">outFile</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725770"><span class="hs-identifier hs-var">inFile</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-324"></span><span>      </span><span class="hs-special">}</span><span>
</span><span id="line-325"></span><span>
</span><span id="line-326"></span><span class="hs-comment">-- This one is useful for preprocessors that can't handle literate source.</span><span>
</span><span id="line-327"></span><span class="hs-comment">-- We also need a way to chain preprocessors.</span><span>
</span><span id="line-328"></span><span class="annot"><a href="Distribution.Simple.PreProcess.html#ppUnlit"><span class="hs-identifier hs-type">ppUnlit</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#PreProcessor"><span class="hs-identifier hs-type">PreProcessor</span></a></span><span>
</span><span id="line-329"></span><span id="ppUnlit"><span class="annot"><span class="annottext">ppUnlit :: PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#ppUnlit"><span class="hs-identifier hs-var hs-var">ppUnlit</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-330"></span><span>  </span><span class="annot"><span class="annottext">PreProcessor :: Bool
-&gt; ((String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ())
-&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#PreProcessor"><span class="hs-identifier hs-type">PreProcessor</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-331"></span><span>    </span><span class="annot"><span class="annottext">platformIndependent :: Bool
</span><a href="Distribution.Simple.PreProcess.html#platformIndependent"><span class="hs-identifier hs-var">platformIndependent</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span>
</span><span id="line-332"></span><span>    </span><span class="annot"><span class="annottext">runPreProcessor :: (String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ()
</span><a href="Distribution.Simple.PreProcess.html#runPreProcessor"><span class="hs-identifier hs-var">runPreProcessor</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; String -&gt; Verbosity -&gt; IO ())
-&gt; (String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ()
</span><a href="Distribution.Simple.PreProcess.html#mkSimplePreProcessor"><span class="hs-identifier hs-var">mkSimplePreProcessor</span></a></span><span> </span><span class="annot"><span class="annottext">((String -&gt; String -&gt; Verbosity -&gt; IO ())
 -&gt; (String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ())
-&gt; (String -&gt; String -&gt; Verbosity -&gt; IO ())
-&gt; (String, String)
-&gt; (String, String)
-&gt; Verbosity
-&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679725764"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725764"><span class="hs-identifier hs-var">inFile</span></a></span></span><span> </span><span id="local-6989586621679725763"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725763"><span class="hs-identifier hs-var">outFile</span></a></span></span><span> </span><span id="local-6989586621679725762"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725762"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-333"></span><span>      </span><span class="annot"><span class="annottext">String -&gt; (String -&gt; IO ()) -&gt; IO ()
forall a. String -&gt; (String -&gt; IO a) -&gt; IO a
</span><a href="Distribution.Utils.Generic.html#withUTF8FileContents"><span class="hs-identifier hs-var">withUTF8FileContents</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725764"><span class="hs-identifier hs-var">inFile</span></a></span><span> </span><span class="annot"><span class="annottext">((String -&gt; IO ()) -&gt; IO ()) -&gt; (String -&gt; IO ()) -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679725760"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725760"><span class="hs-identifier hs-var">contents</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-334"></span><span>        </span><span class="annot"><span class="annottext">(String -&gt; IO ())
-&gt; (String -&gt; IO ()) -&gt; Either String String -&gt; IO ()
forall a c b. (a -&gt; c) -&gt; (b -&gt; c) -&gt; Either a b -&gt; c
</span><a href="../../base/src/Data.Either.html#either"><span class="hs-identifier hs-var">either</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String -&gt; IO ()
</span><a href="Distribution.Utils.Generic.html#writeUTF8File"><span class="hs-identifier hs-var">writeUTF8File</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725763"><span class="hs-identifier hs-var">outFile</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
forall a. Verbosity -&gt; String -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725762"><span class="hs-identifier hs-var">verbosity</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String -&gt; Either String String
</span><a href="Distribution.Simple.PreProcess.Unlit.html#unlit"><span class="hs-identifier hs-var">unlit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725764"><span class="hs-identifier hs-var">inFile</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725760"><span class="hs-identifier hs-var">contents</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-335"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-336"></span><span>
</span><span id="line-337"></span><span class="annot"><a href="Distribution.Simple.PreProcess.html#ppCpp"><span class="hs-identifier hs-type">ppCpp</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.BuildInfo.html#BuildInfo"><span class="hs-identifier hs-type">BuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#PreProcessor"><span class="hs-identifier hs-type">PreProcessor</span></a></span><span>
</span><span id="line-338"></span><span id="ppCpp"><span class="annot"><span class="annottext">ppCpp :: BuildInfo
-&gt; LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#ppCpp"><span class="hs-identifier hs-var hs-var">ppCpp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String]
-&gt; BuildInfo
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#ppCpp%27"><span class="hs-identifier hs-var">ppCpp'</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-339"></span><span>
</span><span id="line-340"></span><span class="annot"><a href="Distribution.Simple.PreProcess.html#ppCpp%27"><span class="hs-identifier hs-type">ppCpp'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.BuildInfo.html#BuildInfo"><span class="hs-identifier hs-type">BuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#PreProcessor"><span class="hs-identifier hs-type">PreProcessor</span></a></span><span>
</span><span id="line-341"></span><span id="ppCpp%27"><span class="annot"><span class="annottext">ppCpp' :: [String]
-&gt; BuildInfo
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#ppCpp%27"><span class="hs-identifier hs-var hs-var">ppCpp'</span></a></span></span><span> </span><span id="local-6989586621679725756"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725756"><span class="hs-identifier hs-var">extraArgs</span></a></span></span><span> </span><span id="local-6989586621679725755"><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725755"><span class="hs-identifier hs-var">bi</span></a></span></span><span> </span><span id="local-6989586621679725754"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725754"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679725753"><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725753"><span class="hs-identifier hs-var">clbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-342"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerFlavor
</span><a href="Distribution.Simple.Compiler.html#compilerFlavor"><span class="hs-identifier hs-var">compilerFlavor</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Compiler
</span><a href="Distribution.Types.LocalBuildInfo.html#compiler"><span class="hs-identifier hs-var hs-var">compiler</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725754"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-343"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Program
-&gt; (Version -&gt; Bool)
-&gt; [String]
-&gt; BuildInfo
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#ppGhcCpp"><span class="hs-identifier hs-var">ppGhcCpp</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#ghcProgram"><span class="hs-identifier hs-var">ghcProgram</span></a></span><span>   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Version -&gt; Bool
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725746"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725755"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725754"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725753"><span class="hs-identifier hs-var">clbi</span></a></span><span>
</span><span id="line-344"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHCJS"><span class="hs-identifier hs-var">GHCJS</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Program
-&gt; (Version -&gt; Bool)
-&gt; [String]
-&gt; BuildInfo
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#ppGhcCpp"><span class="hs-identifier hs-var">ppGhcCpp</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#ghcjsProgram"><span class="hs-identifier hs-var">ghcjsProgram</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Version -&gt; Bool
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725746"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725755"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725754"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725753"><span class="hs-identifier hs-var">clbi</span></a></span><span>
</span><span id="line-345"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><span class="hs-identifier">_</span></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[String]
-&gt; BuildInfo
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#ppCpphs"><span class="hs-identifier hs-var">ppCpphs</span></a></span><span>  </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725746"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725755"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725754"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725753"><span class="hs-identifier hs-var">clbi</span></a></span><span>
</span><span id="line-346"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679725742"><span class="annot"><span class="annottext">cppArgs :: [String]
</span><a href="#local-6989586621679725742"><span class="hs-identifier hs-var hs-var">cppArgs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; LocalBuildInfo -&gt; [String]
</span><a href="Distribution.Simple.PreProcess.html#getCppOptions"><span class="hs-identifier hs-var">getCppOptions</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725755"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725754"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-347"></span><span>        </span><span id="local-6989586621679725746"><span class="annot"><span class="annottext">args :: [String]
</span><a href="#local-6989586621679725746"><span class="hs-identifier hs-var hs-var">args</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725742"><span class="hs-identifier hs-var">cppArgs</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725756"><span class="hs-identifier hs-var">extraArgs</span></a></span><span>
</span><span id="line-348"></span><span>
</span><span id="line-349"></span><span class="annot"><a href="Distribution.Simple.PreProcess.html#ppGhcCpp"><span class="hs-identifier hs-type">ppGhcCpp</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Types.html#Program"><span class="hs-identifier hs-type">Program</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.Version.html#Version"><span class="hs-identifier hs-type">Version</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">)</span><span>
</span><span id="line-350"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.BuildInfo.html#BuildInfo"><span class="hs-identifier hs-type">BuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#PreProcessor"><span class="hs-identifier hs-type">PreProcessor</span></a></span><span>
</span><span id="line-351"></span><span id="ppGhcCpp"><span class="annot"><span class="annottext">ppGhcCpp :: Program
-&gt; (Version -&gt; Bool)
-&gt; [String]
-&gt; BuildInfo
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#ppGhcCpp"><span class="hs-identifier hs-var hs-var">ppGhcCpp</span></a></span></span><span> </span><span id="local-6989586621679725740"><span class="annot"><span class="annottext">Program
</span><a href="#local-6989586621679725740"><span class="hs-identifier hs-var">program</span></a></span></span><span> </span><span id="local-6989586621679725739"><span class="annot"><span class="annottext">Version -&gt; Bool
</span><a href="#local-6989586621679725739"><span class="hs-identifier hs-var">xHs</span></a></span></span><span> </span><span id="local-6989586621679725738"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725738"><span class="hs-identifier hs-var">extraArgs</span></a></span></span><span> </span><span id="local-6989586621679725737"><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725737"><span class="hs-identifier hs-var">_bi</span></a></span></span><span> </span><span id="local-6989586621679725736"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725736"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679725735"><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725735"><span class="hs-identifier hs-var">clbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-352"></span><span>  </span><span class="annot"><span class="annottext">PreProcessor :: Bool
-&gt; ((String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ())
-&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#PreProcessor"><span class="hs-identifier hs-type">PreProcessor</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-353"></span><span>    </span><span class="annot"><span class="annottext">platformIndependent :: Bool
</span><a href="Distribution.Simple.PreProcess.html#platformIndependent"><span class="hs-identifier hs-var">platformIndependent</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">,</span><span>
</span><span id="line-354"></span><span>    </span><span class="annot"><span class="annottext">runPreProcessor :: (String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ()
</span><a href="Distribution.Simple.PreProcess.html#runPreProcessor"><span class="hs-identifier hs-var">runPreProcessor</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; String -&gt; Verbosity -&gt; IO ())
-&gt; (String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ()
</span><a href="Distribution.Simple.PreProcess.html#mkSimplePreProcessor"><span class="hs-identifier hs-var">mkSimplePreProcessor</span></a></span><span> </span><span class="annot"><span class="annottext">((String -&gt; String -&gt; Verbosity -&gt; IO ())
 -&gt; (String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ())
-&gt; (String -&gt; String -&gt; Verbosity -&gt; IO ())
-&gt; (String, String)
-&gt; (String, String)
-&gt; Verbosity
-&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679725734"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725734"><span class="hs-identifier hs-var">inFile</span></a></span></span><span> </span><span id="local-6989586621679725733"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725733"><span class="hs-identifier hs-var">outFile</span></a></span></span><span> </span><span id="local-6989586621679725732"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725732"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-355"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621679725731"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679725731"><span class="hs-identifier hs-var">prog</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679725730"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679725730"><span class="hs-identifier hs-var">version</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; Program
-&gt; VersionRange
-&gt; ProgramDb
-&gt; IO (ConfiguredProgram, Version, ProgramDb)
</span><a href="Distribution.Simple.Program.Db.html#requireProgramVersion"><span class="hs-identifier hs-var">requireProgramVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725732"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-356"></span><span>                              </span><span class="annot"><span class="annottext">Program
</span><a href="#local-6989586621679725740"><span class="hs-identifier hs-var">program</span></a></span><span> </span><span class="annot"><span class="annottext">VersionRange
</span><a href="Distribution.Types.VersionRange.Internal.html#anyVersion"><span class="hs-identifier hs-var">anyVersion</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ProgramDb
</span><a href="Distribution.Types.LocalBuildInfo.html#withPrograms"><span class="hs-identifier hs-var hs-var">withPrograms</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725736"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-357"></span><span>      </span><span class="annot"><span class="annottext">Verbosity -&gt; ConfiguredProgram -&gt; [String] -&gt; IO ()
</span><a href="Distribution.Simple.Program.html#runProgram"><span class="hs-identifier hs-var">runProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725732"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679725731"><span class="hs-identifier hs-var">prog</span></a></span><span> </span><span class="annot"><span class="annottext">([String] -&gt; IO ()) -&gt; [String] -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-358"></span><span>          </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-E&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-cpp&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-359"></span><span>          </span><span class="hs-comment">-- This is a bit of an ugly hack. We're going to</span><span>
</span><span id="line-360"></span><span>          </span><span class="hs-comment">-- unlit the file ourselves later on if appropriate,</span><span>
</span><span id="line-361"></span><span>          </span><span class="hs-comment">-- so we need GHC not to unlit it now or it'll get</span><span>
</span><span id="line-362"></span><span>          </span><span class="hs-comment">-- double-unlitted. In the future we might switch to</span><span>
</span><span id="line-363"></span><span>          </span><span class="hs-comment">-- using cpphs --unlit instead.</span><span>
</span><span id="line-364"></span><span>       </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Version -&gt; Bool
</span><a href="#local-6989586621679725739"><span class="hs-identifier hs-var">xHs</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679725730"><span class="hs-identifier hs-var">version</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-x&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hs&quot;</span></span><span class="hs-special">]</span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-365"></span><span>       </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-optP-include&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-optP&quot;</span></span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#autogenComponentModulesDir"><span class="hs-identifier hs-var">autogenComponentModulesDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725736"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725735"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="Distribution.Simple.BuildPaths.html#cppHeaderName"><span class="hs-identifier hs-var">cppHeaderName</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-366"></span><span>       </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-o&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725733"><span class="hs-identifier hs-var">outFile</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725734"><span class="hs-identifier hs-var">inFile</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-367"></span><span>       </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725738"><span class="hs-identifier hs-var">extraArgs</span></a></span><span>
</span><span id="line-368"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-369"></span><span>
</span><span id="line-370"></span><span class="annot"><a href="Distribution.Simple.PreProcess.html#ppCpphs"><span class="hs-identifier hs-type">ppCpphs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.BuildInfo.html#BuildInfo"><span class="hs-identifier hs-type">BuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#PreProcessor"><span class="hs-identifier hs-type">PreProcessor</span></a></span><span>
</span><span id="line-371"></span><span id="ppCpphs"><span class="annot"><span class="annottext">ppCpphs :: [String]
-&gt; BuildInfo
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#ppCpphs"><span class="hs-identifier hs-var hs-var">ppCpphs</span></a></span></span><span> </span><span id="local-6989586621679725725"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725725"><span class="hs-identifier hs-var">extraArgs</span></a></span></span><span> </span><span id="local-6989586621679725724"><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725724"><span class="hs-identifier hs-var">_bi</span></a></span></span><span> </span><span id="local-6989586621679725723"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725723"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679725722"><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725722"><span class="hs-identifier hs-var">clbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-372"></span><span>  </span><span class="annot"><span class="annottext">PreProcessor :: Bool
-&gt; ((String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ())
-&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#PreProcessor"><span class="hs-identifier hs-type">PreProcessor</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-373"></span><span>    </span><span class="annot"><span class="annottext">platformIndependent :: Bool
</span><a href="Distribution.Simple.PreProcess.html#platformIndependent"><span class="hs-identifier hs-var">platformIndependent</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">,</span><span>
</span><span id="line-374"></span><span>    </span><span class="annot"><span class="annottext">runPreProcessor :: (String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ()
</span><a href="Distribution.Simple.PreProcess.html#runPreProcessor"><span class="hs-identifier hs-var">runPreProcessor</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; String -&gt; Verbosity -&gt; IO ())
-&gt; (String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ()
</span><a href="Distribution.Simple.PreProcess.html#mkSimplePreProcessor"><span class="hs-identifier hs-var">mkSimplePreProcessor</span></a></span><span> </span><span class="annot"><span class="annottext">((String -&gt; String -&gt; Verbosity -&gt; IO ())
 -&gt; (String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ())
-&gt; (String -&gt; String -&gt; Verbosity -&gt; IO ())
-&gt; (String, String)
-&gt; (String, String)
-&gt; Verbosity
-&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679725721"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725721"><span class="hs-identifier hs-var">inFile</span></a></span></span><span> </span><span id="local-6989586621679725720"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725720"><span class="hs-identifier hs-var">outFile</span></a></span></span><span> </span><span id="local-6989586621679725719"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725719"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-375"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621679725718"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679725718"><span class="hs-identifier hs-var">cpphsProg</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679725717"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679725717"><span class="hs-identifier hs-var">cpphsVersion</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; Program
-&gt; VersionRange
-&gt; ProgramDb
-&gt; IO (ConfiguredProgram, Version, ProgramDb)
</span><a href="Distribution.Simple.Program.Db.html#requireProgramVersion"><span class="hs-identifier hs-var">requireProgramVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725719"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-376"></span><span>                                        </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#cpphsProgram"><span class="hs-identifier hs-var">cpphsProgram</span></a></span><span> </span><span class="annot"><span class="annottext">VersionRange
</span><a href="Distribution.Types.VersionRange.Internal.html#anyVersion"><span class="hs-identifier hs-var">anyVersion</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ProgramDb
</span><a href="Distribution.Types.LocalBuildInfo.html#withPrograms"><span class="hs-identifier hs-var hs-var">withPrograms</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725723"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-377"></span><span>      </span><span class="annot"><span class="annottext">Verbosity -&gt; ConfiguredProgram -&gt; [String] -&gt; IO ()
</span><a href="Distribution.Simple.Program.html#runProgram"><span class="hs-identifier hs-var">runProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725719"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679725718"><span class="hs-identifier hs-var">cpphsProg</span></a></span><span> </span><span class="annot"><span class="annottext">([String] -&gt; IO ()) -&gt; [String] -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-378"></span><span>          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-O&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725720"><span class="hs-identifier hs-var">outFile</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725721"><span class="hs-identifier hs-var">inFile</span></a></span><span>
</span><span id="line-379"></span><span>        </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--noline&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--strip&quot;</span></span><span>
</span><span id="line-380"></span><span>        </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679725717"><span class="hs-identifier hs-var">cpphsVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">[Int] -&gt; Version
</span><a href="Distribution.Types.Version.html#mkVersion"><span class="hs-identifier hs-var">mkVersion</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">6</span></span><span class="hs-special">]</span><span>
</span><span id="line-381"></span><span>             </span><span class="hs-keyword">then</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--include=&quot;</span></span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#autogenComponentModulesDir"><span class="hs-identifier hs-var">autogenComponentModulesDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725723"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725722"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="Distribution.Simple.BuildPaths.html#cppHeaderName"><span class="hs-identifier hs-var">cppHeaderName</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-382"></span><span>             </span><span class="hs-keyword">else</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-383"></span><span>        </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725725"><span class="hs-identifier hs-var">extraArgs</span></a></span><span>
</span><span id="line-384"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-385"></span><span>
</span><span id="line-386"></span><span class="annot"><a href="Distribution.Simple.PreProcess.html#ppHsc2hs"><span class="hs-identifier hs-type">ppHsc2hs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.BuildInfo.html#BuildInfo"><span class="hs-identifier hs-type">BuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#PreProcessor"><span class="hs-identifier hs-type">PreProcessor</span></a></span><span>
</span><span id="line-387"></span><span id="ppHsc2hs"><span class="annot"><span class="annottext">ppHsc2hs :: BuildInfo
-&gt; LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#ppHsc2hs"><span class="hs-identifier hs-var hs-var">ppHsc2hs</span></a></span></span><span> </span><span id="local-6989586621679725714"><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725714"><span class="hs-identifier hs-var">bi</span></a></span></span><span> </span><span id="local-6989586621679725713"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725713"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679725712"><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725712"><span class="hs-identifier hs-var">clbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-388"></span><span>  </span><span class="annot"><span class="annottext">PreProcessor :: Bool
-&gt; ((String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ())
-&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#PreProcessor"><span class="hs-identifier hs-type">PreProcessor</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-389"></span><span>    </span><span class="annot"><span class="annottext">platformIndependent :: Bool
</span><a href="Distribution.Simple.PreProcess.html#platformIndependent"><span class="hs-identifier hs-var">platformIndependent</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">,</span><span>
</span><span id="line-390"></span><span>    </span><span class="annot"><span class="annottext">runPreProcessor :: (String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ()
</span><a href="Distribution.Simple.PreProcess.html#runPreProcessor"><span class="hs-identifier hs-var">runPreProcessor</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; String -&gt; Verbosity -&gt; IO ())
-&gt; (String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ()
</span><a href="Distribution.Simple.PreProcess.html#mkSimplePreProcessor"><span class="hs-identifier hs-var">mkSimplePreProcessor</span></a></span><span> </span><span class="annot"><span class="annottext">((String -&gt; String -&gt; Verbosity -&gt; IO ())
 -&gt; (String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ())
-&gt; (String -&gt; String -&gt; Verbosity -&gt; IO ())
-&gt; (String, String)
-&gt; (String, String)
-&gt; Verbosity
-&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679725711"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725711"><span class="hs-identifier hs-var">inFile</span></a></span></span><span> </span><span id="local-6989586621679725710"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725710"><span class="hs-identifier hs-var">outFile</span></a></span></span><span> </span><span id="local-6989586621679725709"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725709"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-391"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621679725708"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679725708"><span class="hs-identifier hs-var">gccProg</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; Program -&gt; ProgramDb -&gt; IO (ConfiguredProgram, ProgramDb)
</span><a href="Distribution.Simple.Program.Db.html#requireProgram"><span class="hs-identifier hs-var">requireProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725709"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#gccProgram"><span class="hs-identifier hs-var">gccProgram</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ProgramDb
</span><a href="Distribution.Types.LocalBuildInfo.html#withPrograms"><span class="hs-identifier hs-var hs-var">withPrograms</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725713"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-392"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621679725705"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679725705"><span class="hs-identifier hs-var">hsc2hsProg</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679725704"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679725704"><span class="hs-identifier hs-var">hsc2hsVersion</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; Program
-&gt; VersionRange
-&gt; ProgramDb
-&gt; IO (ConfiguredProgram, Version, ProgramDb)
</span><a href="Distribution.Simple.Program.Db.html#requireProgramVersion"><span class="hs-identifier hs-var">requireProgramVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725709"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-393"></span><span>                                          </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#hsc2hsProgram"><span class="hs-identifier hs-var">hsc2hsProgram</span></a></span><span> </span><span class="annot"><span class="annottext">VersionRange
</span><a href="Distribution.Types.VersionRange.Internal.html#anyVersion"><span class="hs-identifier hs-var">anyVersion</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ProgramDb
</span><a href="Distribution.Types.LocalBuildInfo.html#withPrograms"><span class="hs-identifier hs-var hs-var">withPrograms</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725713"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-394"></span><span>      </span><span class="hs-comment">-- See Trac #13896 and https://github.com/haskell/cabal/issues/3122.</span><span>
</span><span id="line-395"></span><span>      </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679725700"><span class="annot"><span class="annottext">isCross :: Bool
</span><a href="#local-6989586621679725700"><span class="hs-identifier hs-var hs-var">isCross</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Platform
</span><a href="Distribution.Types.LocalBuildInfo.html#hostPlatform"><span class="hs-identifier hs-var hs-var">hostPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725713"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Platform -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="Distribution.System.html#buildPlatform"><span class="hs-identifier hs-var">buildPlatform</span></a></span><span>
</span><span id="line-396"></span><span>          </span><span id="local-6989586621679725696"><span class="annot"><span class="annottext">prependCrossFlags :: [String] -&gt; [String]
</span><a href="#local-6989586621679725696"><span class="hs-identifier hs-var hs-var">prependCrossFlags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725700"><span class="hs-identifier hs-var">isCross</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-x&quot;</span></span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String]
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-397"></span><span>      </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679725693"><span class="annot"><span class="annottext">hsc2hsSupportsResponseFiles :: Bool
</span><a href="#local-6989586621679725693"><span class="hs-identifier hs-var hs-var">hsc2hsSupportsResponseFiles</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679725704"><span class="hs-identifier hs-var">hsc2hsVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">[Int] -&gt; Version
</span><a href="Distribution.Types.Version.html#mkVersion"><span class="hs-identifier hs-var">mkVersion</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">68</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span class="hs-special">]</span><span>
</span><span id="line-398"></span><span>          </span><span id="local-6989586621679725692"><span class="annot"><span class="annottext">pureArgs :: [String]
</span><a href="#local-6989586621679725692"><span class="hs-identifier hs-var hs-var">pureArgs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; String -&gt; String -&gt; [String]
</span><a href="#local-6989586621679725691"><span class="hs-identifier hs-var">genPureArgs</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679725708"><span class="hs-identifier hs-var">gccProg</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725711"><span class="hs-identifier hs-var">inFile</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725710"><span class="hs-identifier hs-var">outFile</span></a></span><span>
</span><span id="line-399"></span><span>      </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725693"><span class="hs-identifier hs-var">hsc2hsSupportsResponseFiles</span></a></span><span>
</span><span id="line-400"></span><span>      </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; TempFileOptions
-&gt; String
-&gt; String
-&gt; Maybe TextEncoding
-&gt; [String]
-&gt; (String -&gt; IO ())
-&gt; IO ()
forall a.
Verbosity
-&gt; TempFileOptions
-&gt; String
-&gt; String
-&gt; Maybe TextEncoding
-&gt; [String]
-&gt; (String -&gt; IO a)
-&gt; IO a
</span><a href="Distribution.Simple.Program.ResponseFile.html#withResponseFile"><span class="hs-identifier hs-var">withResponseFile</span></a></span><span>
</span><span id="line-401"></span><span>             </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725709"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-402"></span><span>             </span><span class="annot"><span class="annottext">TempFileOptions
</span><a href="Distribution.Simple.Utils.html#defaultTempFileOptions"><span class="hs-identifier hs-var">defaultTempFileOptions</span></a></span><span>
</span><span id="line-403"></span><span>             </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeDirectory"><span class="hs-identifier hs-var">takeDirectory</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725710"><span class="hs-identifier hs-var">outFile</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-404"></span><span>             </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hsc2hs-response.txt&quot;</span></span><span>
</span><span id="line-405"></span><span>             </span><span class="annot"><span class="annottext">Maybe TextEncoding
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-406"></span><span>             </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725692"><span class="hs-identifier hs-var">pureArgs</span></a></span><span>
</span><span id="line-407"></span><span>             </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679725688"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725688"><span class="hs-identifier hs-var">responseFileName</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-408"></span><span>                </span><span class="annot"><span class="annottext">Verbosity -&gt; ConfiguredProgram -&gt; [String] -&gt; IO ()
</span><a href="Distribution.Simple.Program.html#runProgram"><span class="hs-identifier hs-var">runProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725709"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679725705"><span class="hs-identifier hs-var">hsc2hsProg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[String] -&gt; [String]
</span><a href="#local-6989586621679725696"><span class="hs-identifier hs-var">prependCrossFlags</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;@&quot;</span></span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725688"><span class="hs-identifier hs-var">responseFileName</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-409"></span><span>      </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; ConfiguredProgram -&gt; [String] -&gt; IO ()
</span><a href="Distribution.Simple.Program.html#runProgram"><span class="hs-identifier hs-var">runProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725709"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679725705"><span class="hs-identifier hs-var">hsc2hsProg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[String] -&gt; [String]
</span><a href="#local-6989586621679725696"><span class="hs-identifier hs-var">prependCrossFlags</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725692"><span class="hs-identifier hs-var">pureArgs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-410"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-411"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-412"></span><span>    </span><span class="hs-comment">-- Returns a list of command line arguments that can either be passed</span><span>
</span><span id="line-413"></span><span>    </span><span class="hs-comment">-- directly, or via a response file.</span><span>
</span><span id="line-414"></span><span>    </span><span class="annot"><a href="#local-6989586621679725691"><span class="hs-identifier hs-type">genPureArgs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Types.html#ConfiguredProgram"><span class="hs-identifier hs-type">ConfiguredProgram</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-415"></span><span>    </span><span id="local-6989586621679725691"><span class="annot"><span class="annottext">genPureArgs :: ConfiguredProgram -&gt; String -&gt; String -&gt; [String]
</span><a href="#local-6989586621679725691"><span class="hs-identifier hs-var hs-var">genPureArgs</span></a></span></span><span> </span><span id="local-6989586621679725687"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679725687"><span class="hs-identifier hs-var">gccProg</span></a></span></span><span> </span><span id="local-6989586621679725686"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725686"><span class="hs-identifier hs-var">inFile</span></a></span></span><span> </span><span id="local-6989586621679725685"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725685"><span class="hs-identifier hs-var">outFile</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-416"></span><span>          </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--cc=&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; String
</span><a href="Distribution.Simple.Program.Types.html#programPath"><span class="hs-identifier hs-var">programPath</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679725687"><span class="hs-identifier hs-var">gccProg</span></a></span><span>
</span><span id="line-417"></span><span>          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--ld=&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; String
</span><a href="Distribution.Simple.Program.Types.html#programPath"><span class="hs-identifier hs-var">programPath</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679725687"><span class="hs-identifier hs-var">gccProg</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-418"></span><span>
</span><span id="line-419"></span><span>          </span><span class="hs-comment">-- Additional gcc options</span><span>
</span><span id="line-420"></span><span>       </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--cflag=&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725683"><span class="hs-identifier hs-var">opt</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679725683"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725683"><span class="hs-identifier hs-var">opt</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; [String]
</span><a href="Distribution.Simple.Program.Types.html#programDefaultArgs"><span class="hs-identifier hs-var hs-var">programDefaultArgs</span></a></span><span>  </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679725687"><span class="hs-identifier hs-var">gccProg</span></a></span><span>
</span><span id="line-421"></span><span>                                    </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; [String]
</span><a href="Distribution.Simple.Program.Types.html#programOverrideArgs"><span class="hs-identifier hs-var hs-var">programOverrideArgs</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679725687"><span class="hs-identifier hs-var">gccProg</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-422"></span><span>       </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--lflag=&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725680"><span class="hs-identifier hs-var">opt</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679725680"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725680"><span class="hs-identifier hs-var">opt</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; [String]
</span><a href="Distribution.Simple.Program.Types.html#programDefaultArgs"><span class="hs-identifier hs-var hs-var">programDefaultArgs</span></a></span><span>  </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679725687"><span class="hs-identifier hs-var">gccProg</span></a></span><span>
</span><span id="line-423"></span><span>                                    </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; [String]
</span><a href="Distribution.Simple.Program.Types.html#programOverrideArgs"><span class="hs-identifier hs-var hs-var">programOverrideArgs</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679725687"><span class="hs-identifier hs-var">gccProg</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-424"></span><span>
</span><span id="line-425"></span><span>          </span><span class="hs-comment">-- OSX frameworks:</span><span>
</span><span id="line-426"></span><span>       </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725679"><span class="hs-identifier hs-var">what</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;=-F&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725678"><span class="hs-identifier hs-var">opt</span></a></span><span>
</span><span id="line-427"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725677"><span class="hs-identifier hs-var">isOSX</span></a></span><span>
</span><span id="line-428"></span><span>          </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679725678"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725678"><span class="hs-identifier hs-var">opt</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String]
forall a. Eq a =&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#nub"><span class="hs-identifier hs-var">nub</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(InstalledPackageInfo -&gt; [String])
-&gt; [InstalledPackageInfo] -&gt; [String]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#frameworkDirs"><span class="hs-identifier hs-var hs-var">Installed.frameworkDirs</span></a></span><span> </span><span class="annot"><span class="annottext">[InstalledPackageInfo]
</span><a href="#local-6989586621679725673"><span class="hs-identifier hs-var">pkgs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-429"></span><span>          </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679725679"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725679"><span class="hs-identifier hs-var">what</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--cflag&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--lflag&quot;</span></span><span class="hs-special">]</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-430"></span><span>       </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--lflag=&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725672"><span class="hs-identifier hs-var">arg</span></a></span><span>
</span><span id="line-431"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725677"><span class="hs-identifier hs-var">isOSX</span></a></span><span>
</span><span id="line-432"></span><span>          </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679725671"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725671"><span class="hs-identifier hs-var">opt</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#frameworks"><span class="hs-identifier hs-var hs-var">PD.frameworks</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725714"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">(InstalledPackageInfo -&gt; [String])
-&gt; [InstalledPackageInfo] -&gt; [String]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#frameworks"><span class="hs-identifier hs-var hs-var">Installed.frameworks</span></a></span><span> </span><span class="annot"><span class="annottext">[InstalledPackageInfo]
</span><a href="#local-6989586621679725673"><span class="hs-identifier hs-var">pkgs</span></a></span><span>
</span><span id="line-433"></span><span>          </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679725672"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725672"><span class="hs-identifier hs-var">arg</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-framework&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725671"><span class="hs-identifier hs-var">opt</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-434"></span><span>
</span><span id="line-435"></span><span>          </span><span class="hs-comment">-- Note that on ELF systems, wherever we use -L, we must also use -R</span><span>
</span><span id="line-436"></span><span>          </span><span class="hs-comment">-- because presumably that -L dir is not on the normal path for the</span><span>
</span><span id="line-437"></span><span>          </span><span class="hs-comment">-- system's dynamic linker. This is needed because hsc2hs works by</span><span>
</span><span id="line-438"></span><span>          </span><span class="hs-comment">-- compiling a C program and then running it.</span><span>
</span><span id="line-439"></span><span>
</span><span id="line-440"></span><span>       </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--cflag=&quot;</span></span><span>   </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725668"><span class="hs-identifier hs-var">opt</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679725668"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725668"><span class="hs-identifier hs-var">opt</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; [String]
</span><a href="Distribution.Simple.PreProcess.html#platformDefines"><span class="hs-identifier hs-var">platformDefines</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725713"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-441"></span><span>
</span><span id="line-442"></span><span>          </span><span class="hs-comment">-- Options from the current package:</span><span>
</span><span id="line-443"></span><span>       </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--cflag=-I&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725667"><span class="hs-identifier hs-var">dir</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679725667"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725667"><span class="hs-identifier hs-var">dir</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#includeDirs"><span class="hs-identifier hs-var hs-var">PD.includeDirs</span></a></span><span>  </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725714"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-444"></span><span>       </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--cflag=-I&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; String
</span><a href="Distribution.Types.LocalBuildInfo.html#buildDir"><span class="hs-identifier hs-var hs-var">buildDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725713"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725665"><span class="hs-identifier hs-var">dir</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679725665"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725665"><span class="hs-identifier hs-var">dir</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#includeDirs"><span class="hs-identifier hs-var hs-var">PD.includeDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725714"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-445"></span><span>       </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--cflag=&quot;</span></span><span>   </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725664"><span class="hs-identifier hs-var">opt</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679725664"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725664"><span class="hs-identifier hs-var">opt</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#ccOptions"><span class="hs-identifier hs-var hs-var">PD.ccOptions</span></a></span><span>    </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725714"><span class="hs-identifier hs-var">bi</span></a></span><span>
</span><span id="line-446"></span><span>                                      </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#cppOptions"><span class="hs-identifier hs-var hs-var">PD.cppOptions</span></a></span><span>   </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725714"><span class="hs-identifier hs-var">bi</span></a></span><span>
</span><span id="line-447"></span><span>                                      </span><span class="hs-comment">-- hsc2hs uses the C ABI</span><span>
</span><span id="line-448"></span><span>                                      </span><span class="hs-comment">-- We assume that there are only C sources</span><span>
</span><span id="line-449"></span><span>                                      </span><span class="hs-comment">-- and C++ functions are exported via a C</span><span>
</span><span id="line-450"></span><span>                                      </span><span class="hs-comment">-- interface and wrapped in a C source file.</span><span>
</span><span id="line-451"></span><span>                                      </span><span class="hs-comment">-- Therefore we do not supply C++ flags</span><span>
</span><span id="line-452"></span><span>                                      </span><span class="hs-comment">-- because there will not be C++ sources.</span><span>
</span><span id="line-453"></span><span>                                      </span><span class="hs-comment">--</span><span>
</span><span id="line-454"></span><span>                                      </span><span class="hs-comment">-- DO NOT add PD.cxxOptions unless this changes!</span><span>
</span><span id="line-455"></span><span>                                      </span><span class="hs-special">]</span><span>
</span><span id="line-456"></span><span>       </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--cflag=&quot;</span></span><span>   </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725661"><span class="hs-identifier hs-var">opt</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679725661"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725661"><span class="hs-identifier hs-var">opt</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span>
</span><span id="line-457"></span><span>               </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-I&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#autogenComponentModulesDir"><span class="hs-identifier hs-var">autogenComponentModulesDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725713"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725712"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-458"></span><span>                 </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-I&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#autogenPackageModulesDir"><span class="hs-identifier hs-var">autogenPackageModulesDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725713"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-459"></span><span>                 </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-include&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#autogenComponentModulesDir"><span class="hs-identifier hs-var">autogenComponentModulesDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725713"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725712"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="Distribution.Simple.BuildPaths.html#cppHeaderName"><span class="hs-identifier hs-var">cppHeaderName</span></a></span><span> </span><span class="hs-special">]</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-460"></span><span>       </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--lflag=-L&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725660"><span class="hs-identifier hs-var">opt</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679725660"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725660"><span class="hs-identifier hs-var">opt</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#extraLibDirs"><span class="hs-identifier hs-var hs-var">PD.extraLibDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725714"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-461"></span><span>       </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--lflag=-Wl,-R,&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725658"><span class="hs-identifier hs-var">opt</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725657"><span class="hs-identifier hs-var">isELF</span></a></span><span>
</span><span id="line-462"></span><span>                                </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679725658"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725658"><span class="hs-identifier hs-var">opt</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#extraLibDirs"><span class="hs-identifier hs-var hs-var">PD.extraLibDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725714"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-463"></span><span>       </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--lflag=-l&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725656"><span class="hs-identifier hs-var">opt</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679725656"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725656"><span class="hs-identifier hs-var">opt</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#extraLibs"><span class="hs-identifier hs-var hs-var">PD.extraLibs</span></a></span><span>    </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725714"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-464"></span><span>       </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--lflag=&quot;</span></span><span>   </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725654"><span class="hs-identifier hs-var">opt</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679725654"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725654"><span class="hs-identifier hs-var">opt</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#ldOptions"><span class="hs-identifier hs-var hs-var">PD.ldOptions</span></a></span><span>    </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725714"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-465"></span><span>
</span><span id="line-466"></span><span>          </span><span class="hs-comment">-- Options from dependent packages</span><span>
</span><span id="line-467"></span><span>       </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--cflag=&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725652"><span class="hs-identifier hs-var">opt</span></a></span><span>
</span><span id="line-468"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679725651"><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725651"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[InstalledPackageInfo]
</span><a href="#local-6989586621679725673"><span class="hs-identifier hs-var">pkgs</span></a></span><span>
</span><span id="line-469"></span><span>          </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679725652"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725652"><span class="hs-identifier hs-var">opt</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-I&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725650"><span class="hs-identifier hs-var">opt</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679725650"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725650"><span class="hs-identifier hs-var">opt</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#includeDirs"><span class="hs-identifier hs-var hs-var">Installed.includeDirs</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725651"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-470"></span><span>                </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span>         </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725648"><span class="hs-identifier hs-var">opt</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679725648"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725648"><span class="hs-identifier hs-var">opt</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#ccOptions"><span class="hs-identifier hs-var hs-var">Installed.ccOptions</span></a></span><span>   </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725651"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="hs-special">]</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-471"></span><span>       </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--lflag=&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725646"><span class="hs-identifier hs-var">opt</span></a></span><span>
</span><span id="line-472"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679725645"><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725645"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[InstalledPackageInfo]
</span><a href="#local-6989586621679725673"><span class="hs-identifier hs-var">pkgs</span></a></span><span>
</span><span id="line-473"></span><span>          </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679725646"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725646"><span class="hs-identifier hs-var">opt</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-L&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725644"><span class="hs-identifier hs-var">opt</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679725644"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725644"><span class="hs-identifier hs-var">opt</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#libraryDirs"><span class="hs-identifier hs-var hs-var">Installed.libraryDirs</span></a></span><span>    </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725645"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-474"></span><span>                </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-Wl,-R,&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725642"><span class="hs-identifier hs-var">opt</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679725657"><span class="hs-identifier hs-var">isELF</span></a></span><span>
</span><span id="line-475"></span><span>                                 </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679725642"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725642"><span class="hs-identifier hs-var">opt</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#libraryDirs"><span class="hs-identifier hs-var hs-var">Installed.libraryDirs</span></a></span><span>    </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725645"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-476"></span><span>                </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-l&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725641"><span class="hs-identifier hs-var">opt</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679725641"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725641"><span class="hs-identifier hs-var">opt</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#extraLibraries"><span class="hs-identifier hs-var hs-var">Installed.extraLibraries</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725645"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-477"></span><span>                </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span>         </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725639"><span class="hs-identifier hs-var">opt</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679725639"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725639"><span class="hs-identifier hs-var">opt</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#ldOptions"><span class="hs-identifier hs-var hs-var">Installed.ldOptions</span></a></span><span>      </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725645"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="hs-special">]</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-478"></span><span>       </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-o&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725685"><span class="hs-identifier hs-var">outFile</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725686"><span class="hs-identifier hs-var">inFile</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-479"></span><span>
</span><span id="line-480"></span><span>    </span><span id="local-6989586621679725637"><span class="annot"><span class="annottext">hacked_index :: InstalledPackageIndex
</span><a href="#local-6989586621679725637"><span class="hs-identifier hs-var hs-var">hacked_index</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstalledPackageIndex -&gt; InstalledPackageIndex
</span><a href="#local-6989586621679725636"><span class="hs-identifier hs-var">packageHacks</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; InstalledPackageIndex
</span><a href="Distribution.Types.LocalBuildInfo.html#installedPkgs"><span class="hs-identifier hs-var hs-var">installedPkgs</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725713"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-481"></span><span>    </span><span class="hs-comment">-- Look only at the dependencies of the current component</span><span>
</span><span id="line-482"></span><span>    </span><span class="hs-comment">-- being built!  This relies on 'installedPkgs' maintaining</span><span>
</span><span id="line-483"></span><span>    </span><span class="hs-comment">-- 'InstalledPackageInfo' for internal deps too; see #2971.</span><span>
</span><span id="line-484"></span><span>    </span><span id="local-6989586621679725673"><span class="annot"><span class="annottext">pkgs :: [InstalledPackageInfo]
</span><a href="#local-6989586621679725673"><span class="hs-identifier hs-var hs-var">pkgs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstalledPackageIndex -&gt; [InstalledPackageInfo]
forall a. PackageInstalled a =&gt; PackageIndex a -&gt; [a]
</span><a href="Distribution.Simple.PackageIndex.html#topologicalOrder"><span class="hs-identifier hs-var">PackageIndex.topologicalOrder</span></a></span><span> </span><span class="annot"><span class="annottext">(InstalledPackageIndex -&gt; [InstalledPackageInfo])
-&gt; InstalledPackageIndex -&gt; [InstalledPackageInfo]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-485"></span><span>           </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">InstalledPackageIndex
-&gt; [UnitId]
-&gt; Either InstalledPackageIndex [(InstalledPackageInfo, [UnitId])]
</span><a href="Distribution.Simple.PackageIndex.html#dependencyClosure"><span class="hs-identifier hs-var">PackageIndex.dependencyClosure</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageIndex
</span><a href="#local-6989586621679725637"><span class="hs-identifier hs-var">hacked_index</span></a></span><span>
</span><span id="line-486"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((UnitId, MungedPackageId) -&gt; UnitId)
-&gt; [(UnitId, MungedPackageId)] -&gt; [UnitId]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(UnitId, MungedPackageId) -&gt; UnitId
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentLocalBuildInfo -&gt; [(UnitId, MungedPackageId)]
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentPackageDeps"><span class="hs-identifier hs-var hs-var">componentPackageDeps</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725712"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-487"></span><span>            </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621679725618"><span class="annot"><span class="annottext">InstalledPackageIndex
</span><a href="#local-6989586621679725618"><span class="hs-identifier hs-var">index'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">InstalledPackageIndex
</span><a href="#local-6989586621679725618"><span class="hs-identifier hs-var">index'</span></a></span><span>
</span><span id="line-488"></span><span>            </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679725617"><span class="annot"><span class="annottext">[(InstalledPackageInfo, [UnitId])]
</span><a href="#local-6989586621679725617"><span class="hs-identifier hs-var">inf</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-489"></span><span>                </span><span class="annot"><span class="annottext">String -&gt; InstalledPackageIndex
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ppHsc2hs: broken closure: &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[(InstalledPackageInfo, [UnitId])] -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">[(InstalledPackageInfo, [UnitId])]
</span><a href="#local-6989586621679725617"><span class="hs-identifier hs-var">inf</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-490"></span><span>    </span><span id="local-6989586621679725677"><span class="annot"><span class="annottext">isOSX :: Bool
</span><a href="#local-6989586621679725677"><span class="hs-identifier hs-var hs-var">isOSX</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#buildOS"><span class="hs-identifier hs-var">buildOS</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#OSX"><span class="hs-identifier hs-var">OSX</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">OS
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-491"></span><span>    </span><span id="local-6989586621679725657"><span class="annot"><span class="annottext">isELF :: Bool
</span><a href="#local-6989586621679725657"><span class="hs-identifier hs-var hs-var">isELF</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#buildOS"><span class="hs-identifier hs-var">buildOS</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#OSX"><span class="hs-identifier hs-var">OSX</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Windows"><span class="hs-identifier hs-var">Windows</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#AIX"><span class="hs-identifier hs-var">AIX</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">OS
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">;</span><span>
</span><span id="line-492"></span><span>    </span><span id="local-6989586621679725636"><span class="annot"><span class="annottext">packageHacks :: InstalledPackageIndex -&gt; InstalledPackageIndex
</span><a href="#local-6989586621679725636"><span class="hs-identifier hs-var hs-var">packageHacks</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerFlavor
</span><a href="Distribution.Simple.Compiler.html#compilerFlavor"><span class="hs-identifier hs-var">compilerFlavor</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Compiler
</span><a href="Distribution.Types.LocalBuildInfo.html#compiler"><span class="hs-identifier hs-var hs-var">compiler</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725713"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-493"></span><span>      </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">InstalledPackageIndex -&gt; InstalledPackageIndex
</span><a href="#local-6989586621679725611"><span class="hs-identifier hs-var">hackRtsPackage</span></a></span><span>
</span><span id="line-494"></span><span>      </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHCJS"><span class="hs-identifier hs-var">GHCJS</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">InstalledPackageIndex -&gt; InstalledPackageIndex
</span><a href="#local-6989586621679725611"><span class="hs-identifier hs-var">hackRtsPackage</span></a></span><span>
</span><span id="line-495"></span><span>      </span><span class="annot"><span class="annottext">CompilerFlavor
</span><span class="hs-identifier">_</span></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">InstalledPackageIndex -&gt; InstalledPackageIndex
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-496"></span><span>    </span><span class="hs-comment">-- We don't link in the actual Haskell libraries of our dependencies, so</span><span>
</span><span id="line-497"></span><span>    </span><span class="hs-comment">-- the -u flags in the ldOptions of the rts package mean linking fails on</span><span>
</span><span id="line-498"></span><span>    </span><span class="hs-comment">-- OS X (its ld is a tad stricter than gnu ld). Thus we remove the</span><span>
</span><span id="line-499"></span><span>    </span><span class="hs-comment">-- ldOptions for GHC's rts package:</span><span>
</span><span id="line-500"></span><span>    </span><span id="local-6989586621679725611"><span class="annot"><span class="annottext">hackRtsPackage :: InstalledPackageIndex -&gt; InstalledPackageIndex
</span><a href="#local-6989586621679725611"><span class="hs-identifier hs-var hs-var">hackRtsPackage</span></a></span></span><span> </span><span id="local-6989586621679725608"><span class="annot"><span class="annottext">InstalledPackageIndex
</span><a href="#local-6989586621679725608"><span class="hs-identifier hs-var">index</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-501"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">InstalledPackageIndex
-&gt; PackageName -&gt; [(Version, [InstalledPackageInfo])]
forall a. PackageIndex a -&gt; PackageName -&gt; [(Version, [a])]
</span><a href="Distribution.Simple.PackageIndex.html#lookupPackageName"><span class="hs-identifier hs-var">PackageIndex.lookupPackageName</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageIndex
</span><a href="#local-6989586621679725608"><span class="hs-identifier hs-var">index</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; PackageName
</span><a href="Distribution.Types.PackageName.html#mkPackageName"><span class="hs-identifier hs-var">mkPackageName</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;rts&quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-502"></span><span>        </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Version
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span id="local-6989586621679725605"><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725605"><span class="hs-identifier hs-var">rts</span></a></span></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-503"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
-&gt; InstalledPackageIndex -&gt; InstalledPackageIndex
</span><a href="Distribution.Simple.PackageIndex.html#insert"><span class="hs-identifier hs-var">PackageIndex.insert</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725605"><span class="hs-identifier hs-var">rts</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ldOptions :: [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#ldOptions"><span class="hs-identifier hs-var">Installed.ldOptions</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">}</span><span> </span><span class="annot"><span class="annottext">InstalledPackageIndex
</span><a href="#local-6989586621679725608"><span class="hs-identifier hs-var">index</span></a></span><span>
</span><span id="line-504"></span><span>        </span><span class="annot"><span class="annottext">[(Version, [InstalledPackageInfo])]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; InstalledPackageIndex
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;No (or multiple) ghc rts package is registered!!&quot;</span></span><span>
</span><span id="line-505"></span><span>
</span><span id="line-506"></span><span class="annot"><a href="Distribution.Simple.PreProcess.html#ppHsc2hsExtras"><span class="hs-identifier hs-type">ppHsc2hsExtras</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#PreProcessorExtras"><span class="hs-identifier hs-type">PreProcessorExtras</span></a></span><span>
</span><span id="line-507"></span><span id="ppHsc2hsExtras"><span class="annot"><span class="annottext">ppHsc2hsExtras :: PreProcessorExtras
</span><a href="Distribution.Simple.PreProcess.html#ppHsc2hsExtras"><span class="hs-identifier hs-var hs-var">ppHsc2hsExtras</span></a></span></span><span> </span><span id="local-6989586621679725602"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725602"><span class="hs-identifier hs-var">buildBaseDir</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; Bool) -&gt; [String] -&gt; [String]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;_hsc.c&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Bool
forall a. Eq a =&gt; [a] -&gt; [a] -&gt; Bool
</span><a href="../../base/src/Data.OldList.html#isSuffixOf"><span class="hs-operator hs-var">`isSuffixOf`</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([String] -&gt; [String]) -&gt; IO [String] -&gt; IO [String]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-operator hs-var">`fmap`</span></a></span><span>
</span><span id="line-508"></span><span>                              </span><span class="annot"><span class="annottext">PreProcessorExtras
</span><a href="Distribution.Simple.Utils.html#getDirectoryContentsRecursive"><span class="hs-identifier hs-var">getDirectoryContentsRecursive</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725602"><span class="hs-identifier hs-var">buildBaseDir</span></a></span><span>
</span><span id="line-509"></span><span>
</span><span id="line-510"></span><span class="annot"><a href="Distribution.Simple.PreProcess.html#ppC2hs"><span class="hs-identifier hs-type">ppC2hs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.BuildInfo.html#BuildInfo"><span class="hs-identifier hs-type">BuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#PreProcessor"><span class="hs-identifier hs-type">PreProcessor</span></a></span><span>
</span><span id="line-511"></span><span id="ppC2hs"><span class="annot"><span class="annottext">ppC2hs :: BuildInfo
-&gt; LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#ppC2hs"><span class="hs-identifier hs-var hs-var">ppC2hs</span></a></span></span><span> </span><span id="local-6989586621679725599"><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725599"><span class="hs-identifier hs-var">bi</span></a></span></span><span> </span><span id="local-6989586621679725598"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725598"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679725597"><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725597"><span class="hs-identifier hs-var">clbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-512"></span><span>  </span><span class="annot"><span class="annottext">PreProcessor :: Bool
-&gt; ((String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ())
-&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#PreProcessor"><span class="hs-identifier hs-type">PreProcessor</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-513"></span><span>    </span><span class="annot"><span class="annottext">platformIndependent :: Bool
</span><a href="Distribution.Simple.PreProcess.html#platformIndependent"><span class="hs-identifier hs-var">platformIndependent</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">,</span><span>
</span><span id="line-514"></span><span>    </span><span class="annot"><span class="annottext">runPreProcessor :: (String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ()
</span><a href="Distribution.Simple.PreProcess.html#runPreProcessor"><span class="hs-identifier hs-var">runPreProcessor</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679725596"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725596"><span class="hs-identifier hs-var">inBaseDir</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679725595"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725595"><span class="hs-identifier hs-var">inRelativeFile</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-515"></span><span>                       </span><span class="hs-special">(</span><span id="local-6989586621679725594"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725594"><span class="hs-identifier hs-var">outBaseDir</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679725593"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725593"><span class="hs-identifier hs-var">outRelativeFile</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679725592"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725592"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-516"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621679725591"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679725591"><span class="hs-identifier hs-var">c2hsProg</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Version
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; Program
-&gt; VersionRange
-&gt; ProgramDb
-&gt; IO (ConfiguredProgram, Version, ProgramDb)
</span><a href="Distribution.Simple.Program.Db.html#requireProgramVersion"><span class="hs-identifier hs-var">requireProgramVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725592"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-517"></span><span>                            </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#c2hsProgram"><span class="hs-identifier hs-var">c2hsProgram</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Version -&gt; VersionRange
</span><a href="Distribution.Types.VersionRange.Internal.html#orLaterVersion"><span class="hs-identifier hs-var">orLaterVersion</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Int] -&gt; Version
</span><a href="Distribution.Types.Version.html#mkVersion"><span class="hs-identifier hs-var">mkVersion</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">15</span></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-518"></span><span>                            </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ProgramDb
</span><a href="Distribution.Types.LocalBuildInfo.html#withPrograms"><span class="hs-identifier hs-var hs-var">withPrograms</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725598"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-519"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621679725588"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679725588"><span class="hs-identifier hs-var">gccProg</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; Program -&gt; ProgramDb -&gt; IO (ConfiguredProgram, ProgramDb)
</span><a href="Distribution.Simple.Program.Db.html#requireProgram"><span class="hs-identifier hs-var">requireProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725592"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#gccProgram"><span class="hs-identifier hs-var">gccProgram</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ProgramDb
</span><a href="Distribution.Types.LocalBuildInfo.html#withPrograms"><span class="hs-identifier hs-var hs-var">withPrograms</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725598"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-520"></span><span>      </span><span class="annot"><span class="annottext">Verbosity -&gt; ConfiguredProgram -&gt; [String] -&gt; IO ()
</span><a href="Distribution.Simple.Program.html#runProgram"><span class="hs-identifier hs-var">runProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725592"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679725591"><span class="hs-identifier hs-var">c2hsProg</span></a></span><span> </span><span class="annot"><span class="annottext">([String] -&gt; IO ()) -&gt; [String] -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-521"></span><span>
</span><span id="line-522"></span><span>          </span><span class="hs-comment">-- Options from the current package:</span><span>
</span><span id="line-523"></span><span>           </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--cpp=&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; String
</span><a href="Distribution.Simple.Program.Types.html#programPath"><span class="hs-identifier hs-var">programPath</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679725588"><span class="hs-identifier hs-var">gccProg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--cppopts=-E&quot;</span></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-524"></span><span>        </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--cppopts=&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725587"><span class="hs-identifier hs-var">opt</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679725587"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725587"><span class="hs-identifier hs-var">opt</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; LocalBuildInfo -&gt; [String]
</span><a href="Distribution.Simple.PreProcess.html#getCppOptions"><span class="hs-identifier hs-var">getCppOptions</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725599"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725598"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-525"></span><span>        </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--cppopts=-include&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#autogenComponentModulesDir"><span class="hs-identifier hs-var">autogenComponentModulesDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725598"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679725597"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="Distribution.Simple.BuildPaths.html#cppHeaderName"><span class="hs-identifier hs-var">cppHeaderName</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-526"></span><span>        </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--include=&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725594"><span class="hs-identifier hs-var">outBaseDir</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-527"></span><span>
</span><span id="line-528"></span><span>          </span><span class="hs-comment">-- Options from dependent packages</span><span>
</span><span id="line-529"></span><span>       </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--cppopts=&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725586"><span class="hs-identifier hs-var">opt</span></a></span><span>
</span><span id="line-530"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679725585"><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725585"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[InstalledPackageInfo]
</span><a href="#local-6989586621679725584"><span class="hs-identifier hs-var">pkgs</span></a></span><span>
</span><span id="line-531"></span><span>          </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679725586"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725586"><span class="hs-identifier hs-var">opt</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-I&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725583"><span class="hs-identifier hs-var">opt</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679725583"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725583"><span class="hs-identifier hs-var">opt</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#includeDirs"><span class="hs-identifier hs-var hs-var">Installed.includeDirs</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725585"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-532"></span><span>                </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span>         </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725582"><span class="hs-identifier hs-var">opt</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679725582"><span class="annot"><span class="annottext">opt :: String
</span><a href="#local-6989586621679725582"><span class="hs-identifier hs-var">opt</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679725581"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679725581"><span class="hs-identifier hs-var">c</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#ccOptions"><span class="hs-identifier hs-var hs-var">Installed.ccOptions</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679725585"><span class="hs-identifier hs-var">pkg</span></a></span><span>
</span><span id="line-533"></span><span>                                                 </span><span class="hs-comment">-- c2hs uses the C ABI</span><span>
</span><span id="line-534"></span><span>                                                 </span><span class="hs-comment">-- We assume that there are only C sources</span><span>
</span><span id="line-535"></span><span>                                                 </span><span class="hs-comment">-- and C++ functions are exported via a C</span><span>
</span><span id="line-536"></span><span>                                                 </span><span class="hs-comment">-- interface and wrapped in a C source file.</span><span>
</span><span id="line-537"></span><span>                                                 </span><span class="hs-comment">-- Therefore we do not supply C++ flags</span><span>
</span><span id="line-538"></span><span>                                                 </span><span class="hs-comment">-- because there will not be C++ sources.</span><span>
</span><span id="line-539"></span><span>                                                 </span><span class="hs-comment">--</span><span>
</span><span id="line-540"></span><span>                                                 </span><span class="hs-comment">--</span><span>
</span><span id="line-541"></span><span>                                                 </span><span class="hs-comment">-- DO NOT add Installed.cxxOptions unless this changes!</span><span>
</span><span id="line-542"></span><span>                                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679725581"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; String -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;DIU&quot;</span></span><span> </span><span class="hs-special">]</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-543"></span><span>          </span><span class="hs-comment">--TODO: install .chi files for packages, so we can --include</span><span>
</span><span id="line-544"></span><span>          </span><span class="hs-comment">-- those dirs here, for the dependencies</span><span>
</span><span id="line-545"></span><span>
</span><span id="line-546"></span><span>           </span><span class="hs-comment">-- input and output files</span><span>
</span><span id="line-547"></span><span>        </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--output-dir=&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725594"><span class="hs-identifier hs-var">outBaseDir</span></a></span><span>
</span><span id="line-548"></span><span>           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--output=&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725593"><span class="hs-identifier hs-var">outRelativeFile</span></a></span><span>
</span><span id="line-549"></span><span>           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725596"><span class="hs-identifier hs-var">inBaseDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725595"><span class="hs-identifier hs-var">inRelativeFile</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-550"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-551"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-552"></span><span>    </span><span id="local-6989586621679725584"><span class="annot"><span class="annottext">pkgs :: [InstalledPackageInfo]
</span><a href="#local-6989586621679725584"><span class="hs-identifier hs-var hs-var">pkgs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstalledPackageIndex -&gt; [InstalledPackageInfo]
forall a. PackageInstalled a =&gt; PackageIndex a -&gt; [a]
</span><a href="Distribution.Simple.PackageIndex.html#topologicalOrder"><span class="hs-identifier hs-var">PackageIndex.topologicalOrder</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; InstalledPackageIndex
</span><a href="Distribution.Types.LocalBuildInfo.html#installedPkgs"><span class="hs-identifier hs-var hs-var">installedPkgs</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725598"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-553"></span><span>
</span><span id="line-554"></span><span class="annot"><a href="Distribution.Simple.PreProcess.html#ppC2hsExtras"><span class="hs-identifier hs-type">ppC2hsExtras</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#PreProcessorExtras"><span class="hs-identifier hs-type">PreProcessorExtras</span></a></span><span>
</span><span id="line-555"></span><span id="ppC2hsExtras"><span class="annot"><span class="annottext">ppC2hsExtras :: PreProcessorExtras
</span><a href="Distribution.Simple.PreProcess.html#ppC2hsExtras"><span class="hs-identifier hs-var hs-var">ppC2hsExtras</span></a></span></span><span> </span><span id="local-6989586621679725577"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725577"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; Bool) -&gt; [String] -&gt; [String]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679725576"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725576"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeExtensions"><span class="hs-identifier hs-var">takeExtensions</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725576"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.chs.c&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([String] -&gt; [String]) -&gt; IO [String] -&gt; IO [String]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-operator hs-var">`fmap`</span></a></span><span>
</span><span id="line-556"></span><span>                 </span><span class="annot"><span class="annottext">PreProcessorExtras
</span><a href="Distribution.Simple.Utils.html#getDirectoryContentsRecursive"><span class="hs-identifier hs-var">getDirectoryContentsRecursive</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725577"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-557"></span><span>
</span><span id="line-558"></span><span class="hs-comment">--TODO: perhaps use this with hsc2hs too</span><span>
</span><span id="line-559"></span><span class="hs-comment">--TODO: remove cc-options from cpphs for cabal-version: &gt;= 1.10</span><span>
</span><span id="line-560"></span><span class="hs-comment">--TODO: Refactor and add separate getCppOptionsForHs, getCppOptionsForCxx, &amp; getCppOptionsForC</span><span>
</span><span id="line-561"></span><span class="hs-comment">--      instead of combining all these cases in a single function. This blind combination can</span><span>
</span><span id="line-562"></span><span class="hs-comment">--      potentially lead to compilation inconsistencies.</span><span>
</span><span id="line-563"></span><span class="annot"><a href="Distribution.Simple.PreProcess.html#getCppOptions"><span class="hs-identifier hs-type">getCppOptions</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.BuildInfo.html#BuildInfo"><span class="hs-identifier hs-type">BuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-564"></span><span id="getCppOptions"><span class="annot"><span class="annottext">getCppOptions :: BuildInfo -&gt; LocalBuildInfo -&gt; [String]
</span><a href="Distribution.Simple.PreProcess.html#getCppOptions"><span class="hs-identifier hs-var hs-var">getCppOptions</span></a></span></span><span> </span><span id="local-6989586621679725575"><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725575"><span class="hs-identifier hs-var">bi</span></a></span></span><span> </span><span id="local-6989586621679725574"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725574"><span class="hs-identifier hs-var">lbi</span></a></span></span><span>
</span><span id="line-565"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; [String]
</span><a href="Distribution.Simple.PreProcess.html#platformDefines"><span class="hs-identifier hs-var">platformDefines</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725574"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-566"></span><span>   </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#cppOptions"><span class="hs-identifier hs-var hs-var">cppOptions</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725575"><span class="hs-identifier hs-var">bi</span></a></span><span>
</span><span id="line-567"></span><span>   </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-I&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725573"><span class="hs-identifier hs-var">dir</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679725573"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725573"><span class="hs-identifier hs-var">dir</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#includeDirs"><span class="hs-identifier hs-var hs-var">PD.includeDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725575"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-568"></span><span>   </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725572"><span class="hs-identifier hs-var">opt</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679725572"><span class="annot"><span class="annottext">opt :: String
</span><a href="#local-6989586621679725572"><span class="hs-identifier hs-var">opt</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679725571"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679725571"><span class="hs-identifier hs-var">c</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#ccOptions"><span class="hs-identifier hs-var hs-var">PD.ccOptions</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725575"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#cxxOptions"><span class="hs-identifier hs-var hs-var">PD.cxxOptions</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679725575"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679725571"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; String -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;DIU&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-569"></span><span>
</span><span id="line-570"></span><span class="annot"><a href="Distribution.Simple.PreProcess.html#platformDefines"><span class="hs-identifier hs-type">platformDefines</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-571"></span><span id="platformDefines"><span class="annot"><span class="annottext">platformDefines :: LocalBuildInfo -&gt; [String]
</span><a href="Distribution.Simple.PreProcess.html#platformDefines"><span class="hs-identifier hs-var hs-var">platformDefines</span></a></span></span><span> </span><span id="local-6989586621679725569"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725569"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-572"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerFlavor
</span><a href="Distribution.Simple.Compiler.html#compilerFlavor"><span class="hs-identifier hs-var">compilerFlavor</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679725568"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-573"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-574"></span><span>      </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-D__GLASGOW_HASKELL__=&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; String
</span><a href="#local-6989586621679725567"><span class="hs-identifier hs-var">versionInt</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679725566"><span class="hs-identifier hs-var">version</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-575"></span><span>      </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-D&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="../../base/src/System.Info.html#os"><span class="hs-identifier hs-var">os</span></a></span><span>   </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;_BUILD_OS=1&quot;</span></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-576"></span><span>      </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-D&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="../../base/src/System.Info.html#arch"><span class="hs-identifier hs-var">arch</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;_BUILD_ARCH=1&quot;</span></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-577"></span><span>      </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; [String] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679725565"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725565"><span class="hs-identifier hs-var">os'</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-D&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725565"><span class="hs-identifier hs-var">os'</span></a></span><span>   </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;_HOST_OS=1&quot;</span></span><span class="hs-special">)</span><span>   </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725564"><span class="hs-identifier hs-var">osStr</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-578"></span><span>      </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; [String] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679725563"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725563"><span class="hs-identifier hs-var">arch'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-D&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725563"><span class="hs-identifier hs-var">arch'</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;_HOST_ARCH=1&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725562"><span class="hs-identifier hs-var">archStr</span></a></span><span>
</span><span id="line-579"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHCJS"><span class="hs-identifier hs-var">GHCJS</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-580"></span><span>      </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725561"><span class="hs-identifier hs-var">compatGlasgowHaskell</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-581"></span><span>      </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-D__GHCJS__=&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; String
</span><a href="#local-6989586621679725567"><span class="hs-identifier hs-var">versionInt</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679725566"><span class="hs-identifier hs-var">version</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-582"></span><span>      </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-D&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="../../base/src/System.Info.html#os"><span class="hs-identifier hs-var">os</span></a></span><span>   </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;_BUILD_OS=1&quot;</span></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-583"></span><span>      </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-D&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="../../base/src/System.Info.html#arch"><span class="hs-identifier hs-var">arch</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;_BUILD_ARCH=1&quot;</span></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-584"></span><span>      </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; [String] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679725560"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725560"><span class="hs-identifier hs-var">os'</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-D&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725560"><span class="hs-identifier hs-var">os'</span></a></span><span>   </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;_HOST_OS=1&quot;</span></span><span class="hs-special">)</span><span>   </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725564"><span class="hs-identifier hs-var">osStr</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-585"></span><span>      </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; [String] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679725559"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725559"><span class="hs-identifier hs-var">arch'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-D&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725559"><span class="hs-identifier hs-var">arch'</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;_HOST_ARCH=1&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725562"><span class="hs-identifier hs-var">archStr</span></a></span><span>
</span><span id="line-586"></span><span>    </span><span class="annot"><a href="Distribution.Compiler.html#HaskellSuite"><span class="hs-identifier hs-type">HaskellSuite</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-587"></span><span>      </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-D__HASKELL_SUITE__&quot;</span></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-588"></span><span>        </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; [String] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679725557"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725557"><span class="hs-identifier hs-var">os'</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-D&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725557"><span class="hs-identifier hs-var">os'</span></a></span><span>   </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;_HOST_OS=1&quot;</span></span><span class="hs-special">)</span><span>   </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725564"><span class="hs-identifier hs-var">osStr</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-589"></span><span>        </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; [String] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679725556"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725556"><span class="hs-identifier hs-var">arch'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-D&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725556"><span class="hs-identifier hs-var">arch'</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;_HOST_ARCH=1&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725562"><span class="hs-identifier hs-var">archStr</span></a></span><span>
</span><span id="line-590"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><span class="hs-identifier">_</span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-591"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-592"></span><span>    </span><span id="local-6989586621679725568"><span class="annot"><span class="annottext">comp :: Compiler
</span><a href="#local-6989586621679725568"><span class="hs-identifier hs-var hs-var">comp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Compiler
</span><a href="Distribution.Types.LocalBuildInfo.html#compiler"><span class="hs-identifier hs-var hs-var">compiler</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725569"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-593"></span><span>    </span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span id="local-6989586621679725554"><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621679725554"><span class="hs-identifier hs-var">hostArch</span></a></span></span><span> </span><span id="local-6989586621679725553"><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679725553"><span class="hs-identifier hs-var">hostOS</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Platform
</span><a href="Distribution.Types.LocalBuildInfo.html#hostPlatform"><span class="hs-identifier hs-var hs-var">hostPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725569"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-594"></span><span>    </span><span id="local-6989586621679725566"><span class="annot"><span class="annottext">version :: Version
</span><a href="#local-6989586621679725566"><span class="hs-identifier hs-var hs-var">version</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; Version
</span><a href="Distribution.Simple.Compiler.html#compilerVersion"><span class="hs-identifier hs-var">compilerVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679725568"><span class="hs-identifier hs-var">comp</span></a></span><span>
</span><span id="line-595"></span><span>    </span><span id="local-6989586621679725561"><span class="annot"><span class="annottext">compatGlasgowHaskell :: [String]
</span><a href="#local-6989586621679725561"><span class="hs-identifier hs-var hs-var">compatGlasgowHaskell</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-596"></span><span>      </span><span class="annot"><span class="annottext">[String] -&gt; (Version -&gt; [String]) -&gt; Maybe Version -&gt; [String]
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="../../base/src/Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679725550"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679725550"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-D__GLASGOW_HASKELL__=&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; String
</span><a href="#local-6989586621679725567"><span class="hs-identifier hs-var">versionInt</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679725550"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-597"></span><span>               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CompilerFlavor -&gt; Compiler -&gt; Maybe Version
</span><a href="Distribution.Simple.Compiler.html#compilerCompatVersion"><span class="hs-identifier hs-var">compilerCompatVersion</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679725568"><span class="hs-identifier hs-var">comp</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-598"></span><span>    </span><span class="hs-comment">-- TODO: move this into the compiler abstraction</span><span>
</span><span id="line-599"></span><span>    </span><span class="hs-comment">-- FIXME: this forces GHC's crazy 4.8.2 -&gt; 408 convention on all</span><span>
</span><span id="line-600"></span><span>    </span><span class="hs-comment">-- the other compilers. Check if that's really what they want.</span><span>
</span><span id="line-601"></span><span>    </span><span class="annot"><a href="#local-6989586621679725567"><span class="hs-identifier hs-type">versionInt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.Version.html#Version"><span class="hs-identifier hs-type">Version</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-602"></span><span>    </span><span id="local-6989586621679725567"><span class="annot"><span class="annottext">versionInt :: Version -&gt; String
</span><a href="#local-6989586621679725567"><span class="hs-identifier hs-var hs-var">versionInt</span></a></span></span><span> </span><span id="local-6989586621679725548"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679725548"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Version -&gt; [Int]
</span><a href="Distribution.Types.Version.html#versionNumbers"><span class="hs-identifier hs-var">versionNumbers</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679725548"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-603"></span><span>      </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;1&quot;</span></span><span>
</span><span id="line-604"></span><span>      </span><span class="hs-special">[</span><span id="local-6989586621679725546"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679725546"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679725546"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-605"></span><span>      </span><span id="local-6989586621679725545"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679725545"><span class="hs-identifier hs-var">n1</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679725544"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679725544"><span class="hs-identifier hs-var">n2</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[Int]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-606"></span><span>        </span><span class="hs-comment">-- 6.8.x -&gt; 608</span><span>
</span><span id="line-607"></span><span>        </span><span class="hs-comment">-- 6.10.x -&gt; 610</span><span>
</span><span id="line-608"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679725542"><span class="annot"><span class="annottext">s1 :: String
</span><a href="#local-6989586621679725542"><span class="hs-identifier hs-var hs-var">s1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679725545"><span class="hs-identifier hs-var">n1</span></a></span><span>
</span><span id="line-609"></span><span>            </span><span id="local-6989586621679725540"><span class="annot"><span class="annottext">s2 :: String
</span><a href="#local-6989586621679725540"><span class="hs-identifier hs-var hs-var">s2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679725544"><span class="hs-identifier hs-var">n2</span></a></span><span>
</span><span id="line-610"></span><span>            </span><span id="local-6989586621679725539"><span class="annot"><span class="annottext">middle :: String
</span><a href="#local-6989586621679725539"><span class="hs-identifier hs-var hs-var">middle</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725540"><span class="hs-identifier hs-var">s2</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-611"></span><span>                     </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-612"></span><span>                     </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;0&quot;</span></span><span>
</span><span id="line-613"></span><span>        </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725542"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725539"><span class="hs-identifier hs-var">middle</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725540"><span class="hs-identifier hs-var">s2</span></a></span><span>
</span><span id="line-614"></span><span>
</span><span id="line-615"></span><span>    </span><span id="local-6989586621679725564"><span class="annot"><span class="annottext">osStr :: [String]
</span><a href="#local-6989586621679725564"><span class="hs-identifier hs-var hs-var">osStr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679725553"><span class="hs-identifier hs-var">hostOS</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-616"></span><span>      </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Linux"><span class="hs-identifier hs-var">Linux</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;linux&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-617"></span><span>      </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Windows"><span class="hs-identifier hs-var">Windows</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;mingw32&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-618"></span><span>      </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#OSX"><span class="hs-identifier hs-var">OSX</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;darwin&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-619"></span><span>      </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#FreeBSD"><span class="hs-identifier hs-var">FreeBSD</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;freebsd&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-620"></span><span>      </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#OpenBSD"><span class="hs-identifier hs-var">OpenBSD</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;openbsd&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-621"></span><span>      </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#NetBSD"><span class="hs-identifier hs-var">NetBSD</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;netbsd&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-622"></span><span>      </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#DragonFly"><span class="hs-identifier hs-var">DragonFly</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dragonfly&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-623"></span><span>      </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Solaris"><span class="hs-identifier hs-var">Solaris</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;solaris2&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-624"></span><span>      </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#AIX"><span class="hs-identifier hs-var">AIX</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;aix&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-625"></span><span>      </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#HPUX"><span class="hs-identifier hs-var">HPUX</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hpux&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-626"></span><span>      </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#IRIX"><span class="hs-identifier hs-var">IRIX</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;irix&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-627"></span><span>      </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#HaLVM"><span class="hs-identifier hs-var">HaLVM</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-628"></span><span>      </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#IOS"><span class="hs-identifier hs-var">IOS</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ios&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-629"></span><span>      </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Android"><span class="hs-identifier hs-var">Android</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;android&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-630"></span><span>      </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Ghcjs"><span class="hs-identifier hs-var">Ghcjs</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ghcjs&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-631"></span><span>      </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Hurd"><span class="hs-identifier hs-var">Hurd</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hurd&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-632"></span><span>      </span><span class="annot"><a href="Distribution.System.html#OtherOS"><span class="hs-identifier hs-type">OtherOS</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-633"></span><span>    </span><span id="local-6989586621679725562"><span class="annot"><span class="annottext">archStr :: [String]
</span><a href="#local-6989586621679725562"><span class="hs-identifier hs-var hs-var">archStr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621679725554"><span class="hs-identifier hs-var">hostArch</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-634"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="Distribution.System.html#I386"><span class="hs-identifier hs-var">I386</span></a></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;i386&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-635"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="Distribution.System.html#X86_64"><span class="hs-identifier hs-var">X86_64</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;x86_64&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-636"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="Distribution.System.html#PPC"><span class="hs-identifier hs-var">PPC</span></a></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;powerpc&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-637"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="Distribution.System.html#PPC64"><span class="hs-identifier hs-var">PPC64</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;powerpc64&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-638"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="Distribution.System.html#Sparc"><span class="hs-identifier hs-var">Sparc</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;sparc&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-639"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="Distribution.System.html#Arm"><span class="hs-identifier hs-var">Arm</span></a></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;arm&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-640"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="Distribution.System.html#AArch64"><span class="hs-identifier hs-var">AArch64</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;aarch64&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-641"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="Distribution.System.html#Mips"><span class="hs-identifier hs-var">Mips</span></a></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;mips&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-642"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="Distribution.System.html#SH"><span class="hs-identifier hs-var">SH</span></a></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-643"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="Distribution.System.html#IA64"><span class="hs-identifier hs-var">IA64</span></a></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ia64&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-644"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="Distribution.System.html#S390"><span class="hs-identifier hs-var">S390</span></a></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;s390&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-645"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="Distribution.System.html#Alpha"><span class="hs-identifier hs-var">Alpha</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;alpha&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-646"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="Distribution.System.html#Hppa"><span class="hs-identifier hs-var">Hppa</span></a></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hppa&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-647"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="Distribution.System.html#Rs6000"><span class="hs-identifier hs-var">Rs6000</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;rs6000&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-648"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="Distribution.System.html#M68k"><span class="hs-identifier hs-var">M68k</span></a></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;m68k&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-649"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="Distribution.System.html#Vax"><span class="hs-identifier hs-var">Vax</span></a></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;vax&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-650"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="Distribution.System.html#JavaScript"><span class="hs-identifier hs-var">JavaScript</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;javascript&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-651"></span><span>      </span><span class="annot"><a href="Distribution.System.html#OtherArch"><span class="hs-identifier hs-type">OtherArch</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-652"></span><span>
</span><span id="line-653"></span><span class="annot"><a href="Distribution.Simple.PreProcess.html#ppHappy"><span class="hs-identifier hs-type">ppHappy</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.BuildInfo.html#BuildInfo"><span class="hs-identifier hs-type">BuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#PreProcessor"><span class="hs-identifier hs-type">PreProcessor</span></a></span><span>
</span><span id="line-654"></span><span id="ppHappy"><span class="annot"><span class="annottext">ppHappy :: BuildInfo
-&gt; LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#ppHappy"><span class="hs-identifier hs-var hs-var">ppHappy</span></a></span></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679725506"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725506"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PreProcessor
</span><a href="#local-6989586621679725505"><span class="hs-identifier hs-var">pp</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">platformIndependent :: Bool
</span><a href="Distribution.Simple.PreProcess.html#platformIndependent"><span class="hs-identifier hs-var">platformIndependent</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-655"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679725505"><span class="annot"><span class="annottext">pp :: PreProcessor
</span><a href="#local-6989586621679725505"><span class="hs-identifier hs-var hs-var">pp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Program -&gt; [String] -&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#standardPP"><span class="hs-identifier hs-var">standardPP</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725506"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#happyProgram"><span class="hs-identifier hs-var">happyProgram</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CompilerFlavor -&gt; [String]
</span><a href="#local-6989586621679725502"><span class="hs-identifier hs-var">hcFlags</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679725501"><span class="hs-identifier hs-var">hc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-656"></span><span>        </span><span id="local-6989586621679725501"><span class="annot"><span class="annottext">hc :: CompilerFlavor
</span><a href="#local-6989586621679725501"><span class="hs-identifier hs-var hs-var">hc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerFlavor
</span><a href="Distribution.Simple.Compiler.html#compilerFlavor"><span class="hs-identifier hs-var">compilerFlavor</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Compiler
</span><a href="Distribution.Types.LocalBuildInfo.html#compiler"><span class="hs-identifier hs-var hs-var">compiler</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725506"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-657"></span><span>        </span><span id="local-6989586621679725502"><span class="annot"><span class="annottext">hcFlags :: CompilerFlavor -&gt; [String]
</span><a href="#local-6989586621679725502"><span class="hs-identifier hs-var hs-var">hcFlags</span></a></span></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-agc&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-658"></span><span>        </span><span class="annot"><a href="#local-6989586621679725502"><span class="hs-identifier hs-var">hcFlags</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHCJS"><span class="hs-identifier hs-var">GHCJS</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-agc&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-659"></span><span>        </span><span class="annot"><a href="#local-6989586621679725502"><span class="hs-identifier hs-var">hcFlags</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-660"></span><span>
</span><span id="line-661"></span><span class="annot"><a href="Distribution.Simple.PreProcess.html#ppAlex"><span class="hs-identifier hs-type">ppAlex</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.BuildInfo.html#BuildInfo"><span class="hs-identifier hs-type">BuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#PreProcessor"><span class="hs-identifier hs-type">PreProcessor</span></a></span><span>
</span><span id="line-662"></span><span id="ppAlex"><span class="annot"><span class="annottext">ppAlex :: BuildInfo
-&gt; LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#ppAlex"><span class="hs-identifier hs-var hs-var">ppAlex</span></a></span></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679725500"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725500"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PreProcessor
</span><a href="#local-6989586621679725499"><span class="hs-identifier hs-var">pp</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">platformIndependent :: Bool
</span><a href="Distribution.Simple.PreProcess.html#platformIndependent"><span class="hs-identifier hs-var">platformIndependent</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-663"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679725499"><span class="annot"><span class="annottext">pp :: PreProcessor
</span><a href="#local-6989586621679725499"><span class="hs-identifier hs-var hs-var">pp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Program -&gt; [String] -&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#standardPP"><span class="hs-identifier hs-var">standardPP</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725500"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#alexProgram"><span class="hs-identifier hs-var">alexProgram</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CompilerFlavor -&gt; [String]
</span><a href="#local-6989586621679725497"><span class="hs-identifier hs-var">hcFlags</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679725496"><span class="hs-identifier hs-var">hc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-664"></span><span>        </span><span id="local-6989586621679725496"><span class="annot"><span class="annottext">hc :: CompilerFlavor
</span><a href="#local-6989586621679725496"><span class="hs-identifier hs-var hs-var">hc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerFlavor
</span><a href="Distribution.Simple.Compiler.html#compilerFlavor"><span class="hs-identifier hs-var">compilerFlavor</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Compiler
</span><a href="Distribution.Types.LocalBuildInfo.html#compiler"><span class="hs-identifier hs-var hs-var">compiler</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725500"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-665"></span><span>        </span><span id="local-6989586621679725497"><span class="annot"><span class="annottext">hcFlags :: CompilerFlavor -&gt; [String]
</span><a href="#local-6989586621679725497"><span class="hs-identifier hs-var hs-var">hcFlags</span></a></span></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-g&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-666"></span><span>        </span><span class="annot"><a href="#local-6989586621679725497"><span class="hs-identifier hs-var">hcFlags</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHCJS"><span class="hs-identifier hs-var">GHCJS</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-g&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-667"></span><span>        </span><span class="annot"><a href="#local-6989586621679725497"><span class="hs-identifier hs-var">hcFlags</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-668"></span><span>
</span><span id="line-669"></span><span class="annot"><a href="Distribution.Simple.PreProcess.html#standardPP"><span class="hs-identifier hs-type">standardPP</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Types.html#Program"><span class="hs-identifier hs-type">Program</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#PreProcessor"><span class="hs-identifier hs-type">PreProcessor</span></a></span><span>
</span><span id="line-670"></span><span id="standardPP"><span class="annot"><span class="annottext">standardPP :: LocalBuildInfo -&gt; Program -&gt; [String] -&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#standardPP"><span class="hs-identifier hs-var hs-var">standardPP</span></a></span></span><span> </span><span id="local-6989586621679725495"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725495"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679725494"><span class="annot"><span class="annottext">Program
</span><a href="#local-6989586621679725494"><span class="hs-identifier hs-var">prog</span></a></span></span><span> </span><span id="local-6989586621679725493"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725493"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-671"></span><span>  </span><span class="annot"><span class="annottext">PreProcessor :: Bool
-&gt; ((String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ())
-&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#PreProcessor"><span class="hs-identifier hs-type">PreProcessor</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-672"></span><span>    </span><span class="annot"><span class="annottext">platformIndependent :: Bool
</span><a href="Distribution.Simple.PreProcess.html#platformIndependent"><span class="hs-identifier hs-var">platformIndependent</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">,</span><span>
</span><span id="line-673"></span><span>    </span><span class="annot"><span class="annottext">runPreProcessor :: (String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ()
</span><a href="Distribution.Simple.PreProcess.html#runPreProcessor"><span class="hs-identifier hs-var">runPreProcessor</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; String -&gt; Verbosity -&gt; IO ())
-&gt; (String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ()
</span><a href="Distribution.Simple.PreProcess.html#mkSimplePreProcessor"><span class="hs-identifier hs-var">mkSimplePreProcessor</span></a></span><span> </span><span class="annot"><span class="annottext">((String -&gt; String -&gt; Verbosity -&gt; IO ())
 -&gt; (String, String) -&gt; (String, String) -&gt; Verbosity -&gt; IO ())
-&gt; (String -&gt; String -&gt; Verbosity -&gt; IO ())
-&gt; (String, String)
-&gt; (String, String)
-&gt; Verbosity
-&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679725492"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725492"><span class="hs-identifier hs-var">inFile</span></a></span></span><span> </span><span id="local-6989586621679725491"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725491"><span class="hs-identifier hs-var">outFile</span></a></span></span><span> </span><span id="local-6989586621679725490"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725490"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-674"></span><span>      </span><span class="annot"><span class="annottext">Verbosity -&gt; Program -&gt; ProgramDb -&gt; [String] -&gt; IO ()
</span><a href="Distribution.Simple.Program.html#runDbProgram"><span class="hs-identifier hs-var">runDbProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725490"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="#local-6989586621679725494"><span class="hs-identifier hs-var">prog</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ProgramDb
</span><a href="Distribution.Types.LocalBuildInfo.html#withPrograms"><span class="hs-identifier hs-var hs-var">withPrograms</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725495"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-675"></span><span>                           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725493"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-o&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725491"><span class="hs-identifier hs-var">outFile</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725492"><span class="hs-identifier hs-var">inFile</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-676"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-677"></span><span>
</span><span id="line-678"></span><span class="hs-comment">-- |Convenience function; get the suffixes of these preprocessors.</span><span>
</span><span id="line-679"></span><span class="annot"><a href="Distribution.Simple.PreProcess.html#ppSuffixes"><span class="hs-identifier hs-type">ppSuffixes</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#PPSuffixHandler"><span class="hs-identifier hs-type">PPSuffixHandler</span></a></span><span> </span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-680"></span><span id="ppSuffixes"><span class="annot"><span class="annottext">ppSuffixes :: [PPSuffixHandler] -&gt; [String]
</span><a href="Distribution.Simple.PreProcess.html#ppSuffixes"><span class="hs-identifier hs-var hs-var">ppSuffixes</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(PPSuffixHandler -&gt; String) -&gt; [PPSuffixHandler] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">PPSuffixHandler -&gt; String
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span>
</span><span id="line-681"></span><span>
</span><span id="line-682"></span><span class="hs-comment">-- |Standard preprocessors: GreenCard, c2hs, hsc2hs, happy, alex and cpphs.</span><span>
</span><span id="line-683"></span><span class="annot"><a href="Distribution.Simple.PreProcess.html#knownSuffixHandlers"><span class="hs-identifier hs-type">knownSuffixHandlers</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#PPSuffixHandler"><span class="hs-identifier hs-type">PPSuffixHandler</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-684"></span><span id="knownSuffixHandlers"><span class="annot"><span class="annottext">knownSuffixHandlers :: [PPSuffixHandler]
</span><a href="Distribution.Simple.PreProcess.html#knownSuffixHandlers"><span class="hs-identifier hs-var hs-var">knownSuffixHandlers</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-685"></span><span>  </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;gc&quot;</span></span><span class="hs-special">,</span><span>     </span><span class="annot"><span class="annottext">BuildInfo
-&gt; LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#ppGreenCard"><span class="hs-identifier hs-var">ppGreenCard</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-686"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;chs&quot;</span></span><span class="hs-special">,</span><span>    </span><span class="annot"><span class="annottext">BuildInfo
-&gt; LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#ppC2hs"><span class="hs-identifier hs-var">ppC2hs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-687"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hsc&quot;</span></span><span class="hs-special">,</span><span>    </span><span class="annot"><span class="annottext">BuildInfo
-&gt; LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#ppHsc2hs"><span class="hs-identifier hs-var">ppHsc2hs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-688"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;x&quot;</span></span><span class="hs-special">,</span><span>      </span><span class="annot"><span class="annottext">BuildInfo
-&gt; LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#ppAlex"><span class="hs-identifier hs-var">ppAlex</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-689"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;y&quot;</span></span><span class="hs-special">,</span><span>      </span><span class="annot"><span class="annottext">BuildInfo
-&gt; LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#ppHappy"><span class="hs-identifier hs-var">ppHappy</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-690"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ly&quot;</span></span><span class="hs-special">,</span><span>     </span><span class="annot"><span class="annottext">BuildInfo
-&gt; LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#ppHappy"><span class="hs-identifier hs-var">ppHappy</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-691"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cpphs&quot;</span></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">BuildInfo
-&gt; LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; PreProcessor
</span><a href="Distribution.Simple.PreProcess.html#ppCpp"><span class="hs-identifier hs-var">ppCpp</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-692"></span><span>  </span><span class="hs-special">]</span><span>
</span><span id="line-693"></span><span>
</span><span id="line-694"></span><span class="hs-comment">-- |Standard preprocessors with possible extra C sources: c2hs, hsc2hs.</span><span>
</span><span id="line-695"></span><span class="annot"><a href="Distribution.Simple.PreProcess.html#knownExtrasHandlers"><span class="hs-identifier hs-type">knownExtrasHandlers</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><a href="Distribution.Simple.PreProcess.html#PreProcessorExtras"><span class="hs-identifier hs-type">PreProcessorExtras</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-696"></span><span id="knownExtrasHandlers"><span class="annot"><span class="annottext">knownExtrasHandlers :: [PreProcessorExtras]
</span><a href="Distribution.Simple.PreProcess.html#knownExtrasHandlers"><span class="hs-identifier hs-var hs-var">knownExtrasHandlers</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">PreProcessorExtras
</span><a href="Distribution.Simple.PreProcess.html#ppC2hsExtras"><span class="hs-identifier hs-var">ppC2hsExtras</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">PreProcessorExtras
</span><a href="Distribution.Simple.PreProcess.html#ppHsc2hsExtras"><span class="hs-identifier hs-var">ppHsc2hsExtras</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-697"></span><span>
</span><span id="line-698"></span><span class="hs-comment">-- | Find any extra C sources generated by preprocessing that need to</span><span>
</span><span id="line-699"></span><span class="hs-comment">-- be added to the component (addresses issue #238).</span><span>
</span><span id="line-700"></span><span class="annot"><a href="Distribution.Simple.PreProcess.html#preprocessExtras"><span class="hs-identifier hs-type">preprocessExtras</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-701"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Component.html#Component"><span class="hs-identifier hs-type">Component</span></a></span><span>
</span><span id="line-702"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span>
</span><span id="line-703"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-704"></span><span id="preprocessExtras"><span class="annot"><span class="annottext">preprocessExtras :: Verbosity -&gt; Component -&gt; LocalBuildInfo -&gt; IO [String]
</span><a href="Distribution.Simple.PreProcess.html#preprocessExtras"><span class="hs-identifier hs-var hs-var">preprocessExtras</span></a></span></span><span> </span><span id="local-6989586621679725488"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725488"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679725487"><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679725487"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span id="local-6989586621679725486"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725486"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679725487"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-705"></span><span>  </span><span class="annot"><a href="Distribution.Types.Component.html#CLib"><span class="hs-identifier hs-type">CLib</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">PreProcessorExtras
</span><a href="#local-6989586621679725485"><span class="hs-identifier hs-var">pp</span></a></span><span> </span><span class="annot"><span class="annottext">PreProcessorExtras -&gt; PreProcessorExtras
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; String
</span><a href="Distribution.Types.LocalBuildInfo.html#buildDir"><span class="hs-identifier hs-var hs-var">buildDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725486"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-706"></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.Component.html#CExe"><span class="hs-identifier hs-type">CExe</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.Executable.html#Executable"><span class="hs-identifier hs-type">Executable</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">exeName :: Executable -&gt; UnqualComponentName
</span><a href="Distribution.Types.Executable.html#exeName"><span class="hs-identifier hs-var">exeName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679725484"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679725484"><span class="hs-identifier hs-var">nm</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-707"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679725483"><span class="annot"><span class="annottext">nm' :: String
</span><a href="#local-6989586621679725483"><span class="hs-identifier hs-var hs-var">nm'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; String
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679725484"><span class="hs-identifier hs-var">nm</span></a></span><span>
</span><span id="line-708"></span><span>    </span><span class="annot"><span class="annottext">PreProcessorExtras
</span><a href="#local-6989586621679725485"><span class="hs-identifier hs-var">pp</span></a></span><span> </span><span class="annot"><span class="annottext">PreProcessorExtras -&gt; PreProcessorExtras
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; String
</span><a href="Distribution.Types.LocalBuildInfo.html#buildDir"><span class="hs-identifier hs-var hs-var">buildDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725486"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725483"><span class="hs-identifier hs-var">nm'</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725483"><span class="hs-identifier hs-var">nm'</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-tmp&quot;</span></span><span>
</span><span id="line-709"></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.Component.html#CFLib"><span class="hs-identifier hs-type">CFLib</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.ForeignLib.html#ForeignLib"><span class="hs-identifier hs-type">ForeignLib</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">foreignLibName :: ForeignLib -&gt; UnqualComponentName
</span><a href="Distribution.Types.ForeignLib.html#foreignLibName"><span class="hs-identifier hs-var">foreignLibName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679725482"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679725482"><span class="hs-identifier hs-var">nm</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-710"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679725481"><span class="annot"><span class="annottext">nm' :: String
</span><a href="#local-6989586621679725481"><span class="hs-identifier hs-var hs-var">nm'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; String
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679725482"><span class="hs-identifier hs-var">nm</span></a></span><span>
</span><span id="line-711"></span><span>    </span><span class="annot"><span class="annottext">PreProcessorExtras
</span><a href="#local-6989586621679725485"><span class="hs-identifier hs-var">pp</span></a></span><span> </span><span class="annot"><span class="annottext">PreProcessorExtras -&gt; PreProcessorExtras
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; String
</span><a href="Distribution.Types.LocalBuildInfo.html#buildDir"><span class="hs-identifier hs-var hs-var">buildDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725486"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725481"><span class="hs-identifier hs-var">nm'</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725481"><span class="hs-identifier hs-var">nm'</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-tmp&quot;</span></span><span>
</span><span id="line-712"></span><span>  </span><span class="annot"><a href="Distribution.Types.Component.html#CTest"><span class="hs-identifier hs-type">CTest</span></a></span><span> </span><span id="local-6989586621679725480"><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679725480"><span class="hs-identifier hs-var">test</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-713"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679725479"><span class="annot"><span class="annottext">nm' :: String
</span><a href="#local-6989586621679725479"><span class="hs-identifier hs-var hs-var">nm'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; String
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">(UnqualComponentName -&gt; String) -&gt; UnqualComponentName -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite -&gt; UnqualComponentName
</span><a href="Distribution.Types.TestSuite.html#testName"><span class="hs-identifier hs-var hs-var">testName</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679725480"><span class="hs-identifier hs-var">test</span></a></span><span>
</span><span id="line-714"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">TestSuite -&gt; TestSuiteInterface
</span><a href="Distribution.Types.TestSuite.html#testInterface"><span class="hs-identifier hs-var hs-var">testInterface</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679725480"><span class="hs-identifier hs-var">test</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-715"></span><span>      </span><span class="annot"><a href="Distribution.Types.TestSuiteInterface.html#TestSuiteExeV10"><span class="hs-identifier hs-type">TestSuiteExeV10</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-716"></span><span>          </span><span class="annot"><span class="annottext">PreProcessorExtras
</span><a href="#local-6989586621679725485"><span class="hs-identifier hs-var">pp</span></a></span><span> </span><span class="annot"><span class="annottext">PreProcessorExtras -&gt; PreProcessorExtras
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; String
</span><a href="Distribution.Types.LocalBuildInfo.html#buildDir"><span class="hs-identifier hs-var hs-var">buildDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725486"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725479"><span class="hs-identifier hs-var">nm'</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725479"><span class="hs-identifier hs-var">nm'</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-tmp&quot;</span></span><span>
</span><span id="line-717"></span><span>      </span><span class="annot"><a href="Distribution.Types.TestSuiteInterface.html#TestSuiteLibV09"><span class="hs-identifier hs-type">TestSuiteLibV09</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-718"></span><span>          </span><span class="annot"><span class="annottext">PreProcessorExtras
</span><a href="#local-6989586621679725485"><span class="hs-identifier hs-var">pp</span></a></span><span> </span><span class="annot"><span class="annottext">PreProcessorExtras -&gt; PreProcessorExtras
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; String
</span><a href="Distribution.Types.LocalBuildInfo.html#buildDir"><span class="hs-identifier hs-var hs-var">buildDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725486"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite -&gt; String
</span><a href="Distribution.Simple.Test.LibV09.html#stubName"><span class="hs-identifier hs-var">stubName</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679725480"><span class="hs-identifier hs-var">test</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite -&gt; String
</span><a href="Distribution.Simple.Test.LibV09.html#stubName"><span class="hs-identifier hs-var">stubName</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679725480"><span class="hs-identifier hs-var">test</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-tmp&quot;</span></span><span>
</span><span id="line-719"></span><span>      </span><span class="annot"><a href="Distribution.Types.TestSuiteInterface.html#TestSuiteUnsupported"><span class="hs-identifier hs-type">TestSuiteUnsupported</span></a></span><span> </span><span id="local-6989586621679725478"><span class="annot"><span class="annottext">TestType
</span><a href="#local-6989586621679725478"><span class="hs-identifier hs-var">tt</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-720"></span><span>        </span><span class="annot"><span class="annottext">Verbosity -&gt; PreProcessorExtras
forall a. Verbosity -&gt; String -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725488"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">PreProcessorExtras -&gt; PreProcessorExtras
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;No support for preprocessing test suite type &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-721"></span><span>                         </span><span class="annot"><span class="annottext">TestType -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">TestType
</span><a href="#local-6989586621679725478"><span class="hs-identifier hs-var">tt</span></a></span><span>
</span><span id="line-722"></span><span>  </span><span class="annot"><a href="Distribution.Types.Component.html#CBench"><span class="hs-identifier hs-type">CBench</span></a></span><span> </span><span id="local-6989586621679725477"><span class="annot"><span class="annottext">Benchmark
</span><a href="#local-6989586621679725477"><span class="hs-identifier hs-var">bm</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-723"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679725476"><span class="annot"><span class="annottext">nm' :: String
</span><a href="#local-6989586621679725476"><span class="hs-identifier hs-var hs-var">nm'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; String
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">(UnqualComponentName -&gt; String) -&gt; UnqualComponentName -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Benchmark -&gt; UnqualComponentName
</span><a href="Distribution.Types.Benchmark.html#benchmarkName"><span class="hs-identifier hs-var hs-var">benchmarkName</span></a></span><span> </span><span class="annot"><span class="annottext">Benchmark
</span><a href="#local-6989586621679725477"><span class="hs-identifier hs-var">bm</span></a></span><span>
</span><span id="line-724"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Benchmark -&gt; BenchmarkInterface
</span><a href="Distribution.Types.Benchmark.html#benchmarkInterface"><span class="hs-identifier hs-var hs-var">benchmarkInterface</span></a></span><span> </span><span class="annot"><span class="annottext">Benchmark
</span><a href="#local-6989586621679725477"><span class="hs-identifier hs-var">bm</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-725"></span><span>      </span><span class="annot"><a href="Distribution.Types.BenchmarkInterface.html#BenchmarkExeV10"><span class="hs-identifier hs-type">BenchmarkExeV10</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-726"></span><span>          </span><span class="annot"><span class="annottext">PreProcessorExtras
</span><a href="#local-6989586621679725485"><span class="hs-identifier hs-var">pp</span></a></span><span> </span><span class="annot"><span class="annottext">PreProcessorExtras -&gt; PreProcessorExtras
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; String
</span><a href="Distribution.Types.LocalBuildInfo.html#buildDir"><span class="hs-identifier hs-var hs-var">buildDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725486"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725476"><span class="hs-identifier hs-var">nm'</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725476"><span class="hs-identifier hs-var">nm'</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-tmp&quot;</span></span><span>
</span><span id="line-727"></span><span>      </span><span class="annot"><a href="Distribution.Types.BenchmarkInterface.html#BenchmarkUnsupported"><span class="hs-identifier hs-type">BenchmarkUnsupported</span></a></span><span> </span><span id="local-6989586621679725475"><span class="annot"><span class="annottext">BenchmarkType
</span><a href="#local-6989586621679725475"><span class="hs-identifier hs-var">tt</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-728"></span><span>          </span><span class="annot"><span class="annottext">Verbosity -&gt; PreProcessorExtras
forall a. Verbosity -&gt; String -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679725488"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">PreProcessorExtras -&gt; PreProcessorExtras
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;No support for preprocessing benchmark &quot;</span></span><span>
</span><span id="line-729"></span><span>                        </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;type &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">BenchmarkType -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">BenchmarkType
</span><a href="#local-6989586621679725475"><span class="hs-identifier hs-var">tt</span></a></span><span>
</span><span id="line-730"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-731"></span><span>    </span><span class="annot"><a href="#local-6989586621679725485"><span class="hs-identifier hs-type">pp</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-732"></span><span>    </span><span id="local-6989586621679725485"><span class="annot"><span class="annottext">pp :: PreProcessorExtras
</span><a href="#local-6989586621679725485"><span class="hs-identifier hs-var hs-var">pp</span></a></span></span><span> </span><span id="local-6989586621679725474"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725474"><span class="hs-identifier hs-var">dir</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; [String] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725474"><span class="hs-identifier hs-var">dir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([String] -&gt; [String])
-&gt; ([[String]] -&gt; [String]) -&gt; [[String]] -&gt; [String]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Bool) -&gt; [String] -&gt; [String]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
</span><a href="#local-6989586621679725472"><span class="hs-identifier hs-var">not_sub</span></a></span><span> </span><span class="annot"><span class="annottext">([String] -&gt; [String])
-&gt; ([[String]] -&gt; [String]) -&gt; [[String]] -&gt; [String]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[[String]] -&gt; [String]
forall (t :: * -&gt; *) a. Foldable t =&gt; t [a] -&gt; [a]
</span><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-733"></span><span>          </span><span class="annot"><span class="annottext">([[String]] -&gt; [String]) -&gt; IO [[String]] -&gt; IO [String]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[PreProcessorExtras]
-&gt; (PreProcessorExtras -&gt; IO [String]) -&gt; IO [[String]]
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
t a -&gt; (a -&gt; f b) -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#for"><span class="hs-identifier hs-var">for</span></a></span><span> </span><span class="annot"><span class="annottext">[PreProcessorExtras]
</span><a href="Distribution.Simple.PreProcess.html#knownExtrasHandlers"><span class="hs-identifier hs-var">knownExtrasHandlers</span></a></span><span>
</span><span id="line-734"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(PreProcessorExtras -&gt; WithCallStack (IO [String]))
-&gt; WithCallStack (PreProcessorExtras -&gt; IO [String])
forall a b.
(a -&gt; WithCallStack (IO b)) -&gt; WithCallStack (a -&gt; IO b)
</span><a href="Distribution.Compat.Stack.html#withLexicalCallStack"><span class="hs-identifier hs-var">withLexicalCallStack</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679725466"><span class="annot"><span class="annottext">PreProcessorExtras
</span><a href="#local-6989586621679725466"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">PreProcessorExtras
</span><a href="#local-6989586621679725466"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725474"><span class="hs-identifier hs-var">dir</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-735"></span><span>    </span><span class="hs-comment">-- TODO: This is a terrible hack to work around #3545 while we don't</span><span>
</span><span id="line-736"></span><span>    </span><span class="hs-comment">-- reorganize the directory layout.  Basically, for the main</span><span>
</span><span id="line-737"></span><span>    </span><span class="hs-comment">-- library, we might accidentally pick up autogenerated sources for</span><span>
</span><span id="line-738"></span><span>    </span><span class="hs-comment">-- our subcomponents, because they are all stored as subdirectories</span><span>
</span><span id="line-739"></span><span>    </span><span class="hs-comment">-- in dist/build.  This is a cheap and cheerful check to prevent</span><span>
</span><span id="line-740"></span><span>    </span><span class="hs-comment">-- this from happening.  It is not particularly correct; for example</span><span>
</span><span id="line-741"></span><span>    </span><span class="hs-comment">-- if a user has a test suite named foobar and puts their C file in</span><span>
</span><span id="line-742"></span><span>    </span><span class="hs-comment">-- foobar/foo.c, this test will incorrectly exclude it.  But I</span><span>
</span><span id="line-743"></span><span>    </span><span class="hs-comment">-- didn't want to break BC...</span><span>
</span><span id="line-744"></span><span>    </span><span id="local-6989586621679725472"><span class="annot"><span class="annottext">not_sub :: String -&gt; Bool
</span><a href="#local-6989586621679725472"><span class="hs-identifier hs-var hs-var">not_sub</span></a></span></span><span> </span><span id="local-6989586621679725463"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725463"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Bool] -&gt; Bool
forall (t :: * -&gt; *). Foldable t =&gt; t Bool -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#and"><span class="hs-identifier hs-var">and</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725461"><span class="hs-identifier hs-var">pre</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Bool
forall a. Eq a =&gt; [a] -&gt; [a] -&gt; Bool
</span><a href="../../base/src/Data.OldList.html#isPrefixOf"><span class="hs-operator hs-var">`isPrefixOf`</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725463"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679725461"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679725461"><span class="hs-identifier hs-var">pre</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679725459"><span class="hs-identifier hs-var">component_dirs</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-745"></span><span>    </span><span id="local-6989586621679725459"><span class="annot"><span class="annottext">component_dirs :: [String]
</span><a href="#local-6989586621679725459"><span class="hs-identifier hs-var hs-var">component_dirs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; [String]
</span><a href="#local-6989586621679725458"><span class="hs-identifier hs-var">component_names</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; PackageDescription
</span><a href="Distribution.Types.LocalBuildInfo.html#localPkgDescr"><span class="hs-identifier hs-var hs-var">localPkgDescr</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679725486"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-746"></span><span>    </span><span class="hs-comment">-- TODO: libify me</span><span>
</span><span id="line-747"></span><span>    </span><span id="local-6989586621679725458"><span class="annot"><span class="annottext">component_names :: PackageDescription -&gt; [String]
</span><a href="#local-6989586621679725458"><span class="hs-identifier hs-var hs-var">component_names</span></a></span></span><span> </span><span id="local-6989586621679725454"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725454"><span class="hs-identifier hs-var">pkg_descr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(UnqualComponentName -&gt; String)
-&gt; [UnqualComponentName] -&gt; [String]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; String
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">([UnqualComponentName] -&gt; [String])
-&gt; [UnqualComponentName] -&gt; [String]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-748"></span><span>        </span><span class="annot"><span class="annottext">(Library -&gt; Maybe UnqualComponentName)
-&gt; [Library] -&gt; [UnqualComponentName]
forall a b. (a -&gt; Maybe b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/Data.Maybe.html#mapMaybe"><span class="hs-identifier hs-var">mapMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LibraryName -&gt; Maybe UnqualComponentName
</span><a href="Distribution.Types.LibraryName.html#libraryNameString"><span class="hs-identifier hs-var">libraryNameString</span></a></span><span> </span><span class="annot"><span class="annottext">(LibraryName -&gt; Maybe UnqualComponentName)
-&gt; (Library -&gt; LibraryName) -&gt; Library -&gt; Maybe UnqualComponentName
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Library -&gt; LibraryName
</span><a href="Distribution.Types.Library.html#libName"><span class="hs-identifier hs-var hs-var">libName</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDescription -&gt; [Library]
</span><a href="Distribution.Types.PackageDescription.html#subLibraries"><span class="hs-identifier hs-var hs-var">subLibraries</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725454"><span class="hs-identifier hs-var">pkg_descr</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[UnqualComponentName]
-&gt; [UnqualComponentName] -&gt; [UnqualComponentName]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-749"></span><span>        </span><span class="annot"><span class="annottext">(Executable -&gt; UnqualComponentName)
-&gt; [Executable] -&gt; [UnqualComponentName]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Executable -&gt; UnqualComponentName
</span><a href="Distribution.Types.Executable.html#exeName"><span class="hs-identifier hs-var hs-var">exeName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDescription -&gt; [Executable]
</span><a href="Distribution.Types.PackageDescription.html#executables"><span class="hs-identifier hs-var hs-var">executables</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725454"><span class="hs-identifier hs-var">pkg_descr</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[UnqualComponentName]
-&gt; [UnqualComponentName] -&gt; [UnqualComponentName]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-750"></span><span>        </span><span class="annot"><span class="annottext">(TestSuite -&gt; UnqualComponentName)
-&gt; [TestSuite] -&gt; [UnqualComponentName]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite -&gt; UnqualComponentName
</span><a href="Distribution.Types.TestSuite.html#testName"><span class="hs-identifier hs-var hs-var">testName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDescription -&gt; [TestSuite]
</span><a href="Distribution.Types.PackageDescription.html#testSuites"><span class="hs-identifier hs-var hs-var">testSuites</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725454"><span class="hs-identifier hs-var">pkg_descr</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[UnqualComponentName]
-&gt; [UnqualComponentName] -&gt; [UnqualComponentName]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-751"></span><span>        </span><span class="annot"><span class="annottext">(Benchmark -&gt; UnqualComponentName)
-&gt; [Benchmark] -&gt; [UnqualComponentName]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Benchmark -&gt; UnqualComponentName
</span><a href="Distribution.Types.Benchmark.html#benchmarkName"><span class="hs-identifier hs-var hs-var">benchmarkName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDescription -&gt; [Benchmark]
</span><a href="Distribution.Types.PackageDescription.html#benchmarks"><span class="hs-identifier hs-var hs-var">benchmarks</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679725454"><span class="hs-identifier hs-var">pkg_descr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-752"></span></pre></body></html>